Skip to content

Commit

Permalink
Upgraded to AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
dlew committed Oct 25, 2018
1 parent a60a985 commit 036efd7
Show file tree
Hide file tree
Showing 57 changed files with 260 additions and 187 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ext {
compileSdkVersion = 28
targetSdkVersion = compileSdkVersion

supportLibVersion = '28.0.0'
supportLibVersion = '1.0.0'
lifecycleVersion = '1.1.1'
lifecycleRuntimeVersion = '1.1.1'

Expand All @@ -38,14 +38,14 @@ ext {
// Define all dependencies in the base project, to unify & make it easy to update
rxJava = 'io.reactivex.rxjava2:rxjava:2.2.3'
rxAndroid = 'io.reactivex.rxjava2:rxandroid:2.1.0'
navi = 'com.trello.navi2:navi:2.0.1'
navi = 'com.trello.navi2:navi:2.1.0'
lifecycle = "android.arch.lifecycle:runtime:$lifecycleRuntimeVersion"
lifecycleProcessor = "android.arch.lifecycle:compiler:$lifecycleVersion"
lifecycleExtensions = "android.arch.lifecycle:extensions:$lifecycleVersion"
kotlinStdlib = "org.jetbrains.kotlin:kotlin-stdlib:$verKotlin"
appCompat = "com.android.support:appcompat-v7:$supportLibVersion"
preferenceCompat = "com.android.support:preference-v7:$supportLibVersion"
supportAnnotations = "com.android.support:support-annotations:$supportLibVersion"
appCompat = "androidx.appcompat:appcompat:$supportLibVersion"
preferenceCompat = "androidx.preference:preference:$supportLibVersion"
supportAnnotations = "androidx.annotation:annotation:$supportLibVersion"
jsr305Annotations = 'com.google.code.findbugs:jsr305:3.0.2'
junit = 'junit:junit:4.12'
robolectric = 'org.robolectric:robolectric:3.8'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.tatarka.rxlifecycle_android_lifecycle_kotlin" />
<manifest package="me.tatarka.rxlifecycle_android_lifecycle_kotlin" />
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

package com.trello.rxlifecycle2.android.lifecycle.kotlin

import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleOwner
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import com.trello.lifecycle2.android.lifecycle.AndroidLifecycle
import io.reactivex.*

Expand Down
6 changes: 3 additions & 3 deletions rxlifecycle-android-lifecycle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ dependencies {

implementation rootProject.ext.rxAndroid
implementation rootProject.ext.supportAnnotations
api rootProject.ext.lifecycle
annotationProcessor rootProject.ext.lifecycleProcessor
api 'androidx.lifecycle:lifecycle-runtime:2.0.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'

testImplementation rootProject.ext.junit
testImplementation rootProject.ext.robolectric
testImplementation rootProject.ext.lifecycleExtensions
testImplementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
}

apply from: "$rootDir/gradle/artifacts.gradle"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package com.trello.lifecycle2.android.lifecycle;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
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 androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.OnLifecycleEvent;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.trello.lifecycle2.android.lifecycle;

import android.arch.lifecycle.Lifecycle;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;

import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.OutsideLifecycleException;

import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.lifecycle.Lifecycle;
import io.reactivex.Observable;
import io.reactivex.functions.Function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.trello.rxlifecycle2;

import android.arch.lifecycle.Lifecycle;

import com.trello.lifecycle2.android.lifecycle.RxLifecycleAndroidLifecycle;

import org.junit.Before;
Expand All @@ -10,6 +8,7 @@
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

import androidx.lifecycle.Lifecycle;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.BehaviorSubject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
package com.trello.rxlifecycle2.android.lifecycle;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleOwner;
import android.support.v4.app.FragmentActivity;
import com.trello.lifecycle2.android.lifecycle.AndroidLifecycle;
import com.trello.rxlifecycle2.LifecycleProvider;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.PublishSubject;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -16,6 +11,13 @@
import org.robolectric.android.controller.ActivityController;
import org.robolectric.annotation.Config;

import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.PublishSubject;

@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE, sdk = 17)
public class AndroidLifecycleActivityTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
package com.trello.rxlifecycle2.android.lifecycle;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleOwner;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import com.trello.lifecycle2.android.lifecycle.AndroidLifecycle;
import com.trello.rxlifecycle2.LifecycleProvider;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.PublishSubject;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -17,6 +11,14 @@
import org.robolectric.android.controller.ActivityController;
import org.robolectric.annotation.Config;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.PublishSubject;

@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE)
public class AndroidLifecycleFragmentTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@

package com.trello.rxlifecycle2.android;

import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.view.View;

import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.OutsideLifecycleException;

import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import io.reactivex.Observable;
import io.reactivex.functions.Function;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.trello.rxlifecycle2.android;

import android.view.View;

import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.android.MainThreadDisposable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

import android.app.Activity;
import android.view.View;

import com.trello.rxlifecycle2.android.ActivityEvent;
import com.trello.rxlifecycle2.android.FragmentEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.BehaviorSubject;
import io.reactivex.subjects.PublishSubject;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -32,6 +30,11 @@

import java.util.concurrent.CopyOnWriteArrayList;

import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.BehaviorSubject;
import io.reactivex.subjects.PublishSubject;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
package com.trello.rxlifecycle2.components.preference;

import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.preference.EditTextPreferenceDialogFragmentCompat;
import android.view.View;

import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.RxLifecycle;
import com.trello.rxlifecycle2.android.FragmentEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.EditTextPreferenceDialogFragmentCompat;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
package com.trello.rxlifecycle2.components.preference;

import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.preference.ListPreferenceDialogFragmentCompat;
import android.view.View;

import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.RxLifecycle;
import com.trello.rxlifecycle2.android.FragmentEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.ListPreferenceDialogFragmentCompat;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
package com.trello.rxlifecycle2.components.preference;

import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.preference.PreferenceDialogFragmentCompat;
import android.view.View;

import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.RxLifecycle;
import com.trello.rxlifecycle2.android.FragmentEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceDialogFragmentCompat;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
package com.trello.rxlifecycle2.components.preference;

import android.os.Bundle;
import android.support.v7.preference.PreferenceFragmentCompat;
import android.support.annotation.CallSuper;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.trello.rxlifecycle2.LifecycleProvider;
Expand All @@ -28,6 +23,11 @@
import com.trello.rxlifecycle2.android.FragmentEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceFragmentCompat;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@
package com.trello.rxlifecycle2.components.preference;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;

import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.android.FragmentEvent;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.PublishSubject;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import io.reactivex.Observable;
import io.reactivex.observers.TestObserver;
import io.reactivex.subjects.PublishSubject;

import static com.trello.rxlifecycle2.android.FragmentEvent.STOP;

@RunWith(RobolectricTestRunner.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.RxLifecycle;
import com.trello.rxlifecycle2.android.ActivityEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@

import android.app.DialogFragment;
import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.LifecycleTransformer;
import com.trello.rxlifecycle2.RxLifecycle;
import com.trello.rxlifecycle2.android.FragmentEvent;
import com.trello.rxlifecycle2.android.RxLifecycleAndroid;

import androidx.annotation.CallSuper;
import androidx.annotation.CheckResult;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.reactivex.Observable;
import io.reactivex.subjects.BehaviorSubject;

Expand Down
Loading

0 comments on commit 036efd7

Please sign in to comment.