rx-java Installazione o configurazione


Esempio

rx-java impostato

  1. Gradle

    compile 'io.reactivex:rxjava2:rxjava:2.1.1'
    
  2. Maven

    <dependency>
        <groupId>io.reactivex.rxjava2</groupId>
        <artifactId>rxjava</artifactId>
        <version>2.1.1</version>
    </dependency>
    
  3. Edera

    <dependency org="io.reactivex.rxjava2" name="rxjava" rev="2.1.1" />
    
  4. Istantanee di JFrog

    repositories {
    maven { url 'https://oss.jfrog.org/libs-snapshot' }
    }
    
    dependencies {
        compile 'io.reactivex:rxjava:2.0.0-SNAPSHOT'
    }
    
  5. Se devi scaricare i vasi invece di usare un sistema di build, crea un file Maven pom come questo con la versione desiderata:

    <?xml version="1.0"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.netflix.rxjava.download</groupId>
        <artifactId>rxjava-download</artifactId>
        <version>1.0-SNAPSHOT</version>
        <name>Simple POM to download rxjava and dependencies</name>
        <url>http://github.com/ReactiveX/RxJava</url>
        <dependencies>
            <dependency>
                <groupId>io.reactivex</groupId>
                <artifactId>rxjava</artifactId>
                <version>2.0.0</version>
                <scope/>
            </dependency>
        </dependencies>
    </project>
    

Quindi eseguire:

$ mvn -f download-rxjava-pom.xml dependency:copy-dependencies

Questo comando scarica rxjava-*.jar e le sue dipendenze in ./target/dependency/.

Hai bisogno di Java 6 o versioni successive.