Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artem-zinnatullin/rxjavav1v2adapter
Adapter between RxJava v1 and v2
https://github.com/artem-zinnatullin/rxjavav1v2adapter
Last synced: 23 days ago
JSON representation
Adapter between RxJava v1 and v2
- Host: GitHub
- URL: https://github.com/artem-zinnatullin/rxjavav1v2adapter
- Owner: artem-zinnatullin
- Created: 2016-08-16T11:20:01.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-12T06:56:59.000Z (about 8 years ago)
- Last Synced: 2023-06-29T22:33:04.115Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 61.5 KB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deprecated
Since David Karnok [released his own version of such library](https://github.com/akarnokd/RxJava2Interop) next day I released this library and promotes it everywhere, this project no longer make sense, so please use his [RxJava2Interop](https://github.com/akarnokd/RxJava2Interop).
## RxJava v1 <-> v2 Adapter
Adapter between RxJava [v1][RxJavaV1] and [v2][RxJavaV2].
###With this library you will be able to convert:
* v1 `Observable` to v2 `Observable` and vice versa.
* v1 `Observable` to v2 `Flowable` and vice versa.
* v1 `Single` to v2 `Single` and vice versa.
* v1 `Consumable` to v2 `Consumable` and vice versa.####Download
```groovy
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:
```java
Observable o1 = RxJavaV1V2Adapter.o2ToO1(o2);
```####TODO
* Add v1 `Single` <-> v2 `Single`.
* Add v1 `Consumable` <-> v2 `Consumable`.
* Kotlin part: extension functions `val omg = Observable.just("wow").toO2()`.
* Connect v1 `Observable` Backpressure with v2 `Flowable` Backpressure, currently it runs in unbounded mode.###Warning
This library is unstable simply because it depends on SNAPSHOT version of [RxJava v2][RxJavaV2]. Once [RxJava v2][RxJavaV2] will be released this library will be realeased as stable too.
[RxJavaV1]: https://github.com/ReactiveX/RxJava/tree/1.x
[RxJavaV2]: https://github.com/ReactiveX/RxJava/tree/2.x