Deprecated
Since David Karnok released his own version of such library next day I released this library and promotes it everywhere, this project no longer make sense, so please use his RxJava2Interop.
RxJava v1 <-> v2 Adapter
Adapter between RxJava v1 and v2.
###With this library you will be able to convert:
- v1
Observableto v2Observableand vice versa. - v1
Observableto v2Flowableand vice versa. - v1
Singleto v2Singleand vice versa. - v1
Consumableto v2Consumableand vice versa.
####Download
repositories {
maven { url 'https://oss.jfrog.org/libs-snapshot' } // For RxJava v2 developer preview.
}
dependencies {
compile 'io.reactivex.rxjava2:rxjava:2.0.0-DP0-SNAPSHOT'
compile 'com.artemzin.rxjavav1v2adapter:adapter:0.1.1-developer-preview'
}
####Usage example:
Observable o1 = RxJavaV1V2Adapter.o2ToO1(o2);
####TODO
- Add v1
Single<-> v2Single. - Add v1
Consumable<-> v2Consumable. - Kotlin part: extension functions
val omg = Observable.just("wow").toO2(). - Connect v1
ObservableBackpressure with v2FlowableBackpressure, currently it runs in unbounded mode.
###Warning
This library is unstable simply because it depends on SNAPSHOT version of RxJava v2. Once RxJava v2 will be released this library will be realeased as stable too.