Skip to content

Commit c370300

Browse files
author
KG
committed
chore: jack -> retrolambda
1 parent c66b826 commit c370300

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

app/build.gradle

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1+
buildscript {
2+
repositories {
3+
// mavenCentral()
4+
jcenter()
5+
}
6+
dependencies {
7+
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
8+
// can be removed with android-gradle plugin is upgraded to 2.2
9+
// https://twitter.com/JakeWharton/status/760836175586267136
10+
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
11+
}
12+
13+
// Exclude the lombok version that the android plugin depends on.
14+
configurations.classpath.exclude group: 'com.android.tools.external.lombok'
15+
}
16+
117
apply plugin: 'com.android.application'
18+
apply plugin: 'me.tatarka.retrolambda'
219

320
dependencies {
421
compile 'com.android.support:support-v13:23.2.1'
@@ -27,17 +44,14 @@ dependencies {
2744

2845
android {
2946
compileSdkVersion 23
30-
buildToolsVersion '24rc4'
47+
buildToolsVersion '23.0.3'
3148

3249
defaultConfig {
3350
applicationId "com.morihacky.android.rxjava"
3451
minSdkVersion 15
35-
targetSdkVersion 24
36-
versionCode 1
37-
versionName "1.0"
38-
jackOptions {
39-
enabled true
40-
}
52+
targetSdkVersion 23
53+
versionCode 2
54+
versionName "1.2"
4155
}
4256
buildTypes {
4357
release {

app/src/main/java/com/morihacky/android/rxjava/fragments/ExponentialBackoffFragment.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import butterknife.OnClick;
2121
import rx.Observable;
2222
import rx.Observer;
23+
import rx.Subscriber;
2324
import rx.functions.Func1;
2425
import rx.observables.MathObservable;
2526
import rx.subscriptions.CompositeSubscription;
@@ -75,8 +76,7 @@ public void startRetryingWithExponentialBackoffStrategy() {
7576
Observable//
7677
.error(new RuntimeException("testing")) // always fails
7778
.retryWhen(new RetryWithDelay(5, 1000)) // notice this is called only onError (onNext values sent are ignored)
78-
.doOnSubscribe(() ->
79-
_log("Attempting the impossible 5 times in intervals of 1s"))//
79+
.doOnSubscribe(() -> _log("Attempting the impossible 5 times in intervals of 1s"))//
8080
.subscribe(new Observer<Object>() {
8181
@Override
8282
public void onCompleted() {
@@ -114,7 +114,7 @@ public void startExecutingWithExponentialBackoffDelay() {
114114
.doOnSubscribe(() ->
115115
_log(String.format("Execute 4 tasks with delay - time now: [xx:%02d]",
116116
_getSecondHand())))//
117-
.subscribe(new Observer<Integer>() {
117+
.subscribe(new Subscriber<Integer>() {
118118
@Override
119119
public void onCompleted() {
120120
Timber.d("onCompleted");

0 commit comments

Comments
 (0)