Skip to content

Commit 1961f60

Browse files
committed
Add Scheduler v1->v2 conversion, cleanup v2->v1
1 parent 913f2de commit 1961f60

27 files changed

+422
-45
lines changed

HEADER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright ${year} David Karnok
1+
Copyright 2016-${year} David Karnok
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Library to convert between RxJava 1.x and 2.x reactive types.
1717

1818
```
1919
dependencies {
20-
compile "com.github.akarnokd:rxjava2-interop:0.11.5"
20+
compile "com.github.akarnokd:rxjava2-interop:0.12.0"
2121
}
2222
```
2323

@@ -28,7 +28,7 @@ Maven search:
2828

2929
# Usage
3030

31-
### Converting between the reactive base types
31+
### Convert between the reactive base types
3232

3333
```java
3434
import hu.akarnokd.rxjava.interop.RxJavaInterop;
@@ -62,7 +62,7 @@ rx.Single s1m = RxJavaInterop.toV1Single(MaybeSource);
6262
rx.Completable c1m = RxJavaInterop.toV1Completable(MaybeSource);
6363
```
6464

65-
### Converting between Subjects and Processors.
65+
### Convert between Subjects and Processors.
6666

6767
Note that 2.x `Subject`s and `FlowableProcessor`s support only the same input and output types.
6868

@@ -80,7 +80,7 @@ rx.subjects.Subject sj1 = RxJavaInterop.toV1Subject(io.reactivex.subjects.Subjec
8080
rx.subjects.Subject sj1b = RxJavaInterop.toV1Subject(io.reactivex.processors.FlowableProcessor);
8181
```
8282

83-
### Converting between 1.x `X.Transformer`s and 2.x `XTransformer`s.
83+
### Convert between 1.x `X.Transformer`s and 2.x `XTransformer`s.
8484

8585
```java
8686
// convert from 1.x to 2.x
@@ -130,9 +130,14 @@ io.reactivex.disposables.Disposable d2 = RxJavaInterop.toV2Disposable(rx.Subscri
130130
rx.Subscription s1 = RxJavaInterop.toV1Subscription(io.reactivex.disposables.Disposable);
131131
```
132132

133-
### Convert between 2.x `Scheduler` and 1.x `Scheduler`
133+
134+
### Convert between 1.x `Scheduler`s and 2.x `Scheduler`s
134135

135136
```java
137+
// convert from 1.x to 2.x
138+
139+
io.reactivex.Scheduler s2 = RxJavaInterop.toV2Scheduler(rx.Scheduler);
140+
136141
// convert from 2.x to 1.x
137142

138143
rx.Scheduler s1 = RxJavaInterop.toV1Scheduler(io.reactivex.Scheduler);

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies {
4949
signature 'org.codehaus.mojo.signature:java16:1.1@signature'
5050

5151
compile "org.reactivestreams:reactive-streams:1.0.2"
52-
compile "io.reactivex:rxjava:1.3.4"
52+
compile "io.reactivex:rxjava:1.3.5"
5353
compile "io.reactivex.rxjava2:rxjava:2.1.9"
5454

5555
testCompile group: 'junit', name: 'junit', version: '4.12'
@@ -123,6 +123,10 @@ plugins.withType(EclipsePlugin) {
123123

124124
javadoc {
125125
failOnError = false
126+
127+
options.links("http://docs.oracle.com/javase/7/docs/api/")
128+
options.links("http://reactivex.io/RxJava/1.x/javadoc")
129+
options.links("http://reactivex.io/RxJava/2.x/javadoc")
126130
}
127131

128132
test {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.11.5
1+
version=0.12.0

src/main/java/hu/akarnokd/rxjava/interop/CompletableV1ToCompletableV2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 David Karnok
2+
* Copyright 2016-2018 David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava/interop/CompletableV1ToMaybeV2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 David Karnok
2+
* Copyright 2016-2018 David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava/interop/CompletableV2ToCompletableV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 David Karnok
2+
* Copyright 2016-2018 David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava/interop/DisposableV2ToSubscriptionV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 David Karnok
2+
* Copyright 2016-2018 David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava/interop/FlowableV2ToObservableV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 David Karnok
2+
* Copyright 2016-2018 David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava/interop/MaybeV2ToCompletableV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 David Karnok
2+
* Copyright 2016-2018 David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)