diff --git a/rxlifecycle-android-lifecycle/src/main/java/com/trello/lifecycle2/android/lifecycle/AndroidLifecycle.java b/rxlifecycle-android-lifecycle/src/main/java/com/trello/lifecycle2/android/lifecycle/AndroidLifecycle.java index 2321cfd..b994738 100644 --- a/rxlifecycle-android-lifecycle/src/main/java/com/trello/lifecycle2/android/lifecycle/AndroidLifecycle.java +++ b/rxlifecycle-android-lifecycle/src/main/java/com/trello/lifecycle2/android/lifecycle/AndroidLifecycle.java @@ -5,13 +5,10 @@ import android.arch.lifecycle.LifecycleOwner; import android.arch.lifecycle.OnLifecycleEvent; import android.support.annotation.CheckResult; - +import android.support.annotation.NonNull; import com.trello.rxlifecycle2.LifecycleProvider; import com.trello.rxlifecycle2.LifecycleTransformer; import com.trello.rxlifecycle2.RxLifecycle; - -import javax.annotation.Nonnull; - import io.reactivex.Observable; import io.reactivex.subjects.BehaviorSubject; @@ -38,21 +35,21 @@ private AndroidLifecycle(LifecycleOwner owner) { owner.getLifecycle().addObserver(this); } - @Nonnull + @NonNull @Override @CheckResult public Observable lifecycle() { return lifecycleSubject.hide(); } - @Nonnull + @NonNull @Override @CheckResult - public LifecycleTransformer bindUntilEvent(@Nonnull Lifecycle.Event event) { + public LifecycleTransformer bindUntilEvent(@NonNull Lifecycle.Event event) { return RxLifecycle.bindUntilEvent(lifecycleSubject, event); } - @Nonnull + @NonNull @Override @CheckResult public LifecycleTransformer bindToLifecycle() { diff --git a/rxlifecycle/build.gradle b/rxlifecycle/build.gradle index 3b36b3d..1d99c42 100644 --- a/rxlifecycle/build.gradle +++ b/rxlifecycle/build.gradle @@ -9,7 +9,7 @@ repositories { dependencies { compile rootProject.ext.rxJava - compile rootProject.ext.jsr305Annotations + compileOnly rootProject.ext.jsr305Annotations testCompile rootProject.ext.junit }