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
Observable
to v2Observable
and vice versa. - v1
Observable
to v2Flowable
and vice versa. - v1
Single
to v2Single
and vice versa. - v1
Consumable
to v2Consumable
and 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
Observable
Backpressure with v2Flowable
Backpressure, 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.