From 1377e11ecdf998109faa444177ce51eaa50b0d8c Mon Sep 17 00:00:00 2001 From: Emmanuel Lagarrigue Date: Tue, 16 Oct 2018 15:22:04 -0300 Subject: [PATCH 1/9] Set compile sdk v 28 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 262b386..ac17b9c 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ repositories { } android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { minSdkVersion 15 From b6f5a002237201f297dfe689a43dabae4f466d74 Mon Sep 17 00:00:00 2001 From: Emmanuel Lagarrigue Date: Wed, 17 Oct 2018 19:52:53 -0300 Subject: [PATCH 2/9] Migrate to androidx --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index ac17b9c..4b3b7b9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { - ext.androidPluginVersion = "3.1.3" - ext.kotlinVersion = "1.2.41" + ext.androidPluginVersion = "3.2.1" + ext.kotlinVersion = "1.2.71" repositories { google() @@ -51,5 +51,5 @@ dependencies { testImplementation "junit:junit:4.12" implementation "io.reactivex:rxjava:1.2.4" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" - kapt "com.android.databinding:compiler:3.1.3" + kapt "androidx.databinding:databinding-compiler:3.2.1" } \ No newline at end of file From 4ecc0aa578b779d977f6727cd26fd2683dea2331 Mon Sep 17 00:00:00 2001 From: Emmanuel Lagarrigue Date: Thu, 18 Oct 2018 13:58:36 -0300 Subject: [PATCH 3/9] Migrate to androidx --- build.gradle | 7 +++---- src/main/java/skedgo/rxproperty/RxObservableBoolean.kt | 6 +++--- src/main/java/skedgo/rxproperty/RxObservableField.kt | 6 +++--- src/main/java/skedgo/rxproperty/RxObservableInt.kt | 6 +++--- src/main/java/skedgo/rxproperty/RxObservableList.kt | 4 ++-- .../java/skedgo/rxproperty/RxObservableBooleanKtTest.kt | 2 +- src/test/java/skedgo/rxproperty/RxObservableListKtTest.kt | 4 ++-- 7 files changed, 17 insertions(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index 4b3b7b9..b5aacc4 100644 --- a/build.gradle +++ b/build.gradle @@ -31,11 +31,11 @@ android { defaultConfig { minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" dataBinding { enabled = true } - + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } compileOptions { @@ -49,7 +49,6 @@ android { dependencies { testImplementation "junit:junit:4.12" - implementation "io.reactivex:rxjava:1.2.4" + implementation "io.reactivex:rxjava:1.3.5" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" - kapt "androidx.databinding:databinding-compiler:3.2.1" } \ No newline at end of file diff --git a/src/main/java/skedgo/rxproperty/RxObservableBoolean.kt b/src/main/java/skedgo/rxproperty/RxObservableBoolean.kt index 89578fa..03638f0 100644 --- a/src/main/java/skedgo/rxproperty/RxObservableBoolean.kt +++ b/src/main/java/skedgo/rxproperty/RxObservableBoolean.kt @@ -1,6 +1,6 @@ package skedgo.rxproperty -import android.databinding.ObservableBoolean +import androidx.databinding.ObservableBoolean import rx.Observable import rx.subscriptions.Subscriptions @@ -13,8 +13,8 @@ fun ObservableBoolean.asObservable(): Observable { return Observable.create { // To emit the current value. it.onNext(get()) - val callback = object : android.databinding.Observable.OnPropertyChangedCallback() { - override fun onPropertyChanged(sender: android.databinding.Observable?, propertyId: Int) { + val callback = object : androidx.databinding.Observable.OnPropertyChangedCallback() { + override fun onPropertyChanged(sender: androidx.databinding.Observable?, propertyId: Int) { it.onNext(get()) } } diff --git a/src/main/java/skedgo/rxproperty/RxObservableField.kt b/src/main/java/skedgo/rxproperty/RxObservableField.kt index 94601c3..c1a271a 100644 --- a/src/main/java/skedgo/rxproperty/RxObservableField.kt +++ b/src/main/java/skedgo/rxproperty/RxObservableField.kt @@ -1,6 +1,6 @@ package skedgo.rxproperty -import android.databinding.ObservableField +import androidx.databinding.ObservableField import rx.Observable import rx.subscriptions.Subscriptions @@ -13,8 +13,8 @@ fun ObservableField.asObservable(): Observable { return Observable.create { // To emit the current value. it.onNext(get()) - val callback = object : android.databinding.Observable.OnPropertyChangedCallback() { - override fun onPropertyChanged(sender: android.databinding.Observable?, propertyId: Int) { + val callback = object : androidx.databinding.Observable.OnPropertyChangedCallback() { + override fun onPropertyChanged(sender: androidx.databinding.Observable?, propertyId: Int) { it.onNext(get()) } } diff --git a/src/main/java/skedgo/rxproperty/RxObservableInt.kt b/src/main/java/skedgo/rxproperty/RxObservableInt.kt index 7a83458..bc31282 100644 --- a/src/main/java/skedgo/rxproperty/RxObservableInt.kt +++ b/src/main/java/skedgo/rxproperty/RxObservableInt.kt @@ -1,6 +1,6 @@ package skedgo.rxproperty -import android.databinding.ObservableInt +import androidx.databinding.ObservableInt import rx.Observable import rx.subscriptions.Subscriptions @@ -12,8 +12,8 @@ import rx.subscriptions.Subscriptions fun ObservableInt.asObservable(): Observable = Observable.create { // To emit the current value. it.onNext(get()) - val callback = object : android.databinding.Observable.OnPropertyChangedCallback() { - override fun onPropertyChanged(sender: android.databinding.Observable?, propertyId: Int) { + val callback = object : androidx.databinding.Observable.OnPropertyChangedCallback() { + override fun onPropertyChanged(sender: androidx.databinding.Observable?, propertyId: Int) { it.onNext(get()) } } diff --git a/src/main/java/skedgo/rxproperty/RxObservableList.kt b/src/main/java/skedgo/rxproperty/RxObservableList.kt index 3e263a7..fd197ba 100644 --- a/src/main/java/skedgo/rxproperty/RxObservableList.kt +++ b/src/main/java/skedgo/rxproperty/RxObservableList.kt @@ -1,7 +1,7 @@ package skedgo.rxproperty -import android.databinding.ObservableList -import android.databinding.ObservableList.OnListChangedCallback +import androidx.databinding.ObservableList +import androidx.databinding.ObservableList.OnListChangedCallback import rx.Observable import rx.subscriptions.Subscriptions diff --git a/src/test/java/skedgo/rxproperty/RxObservableBooleanKtTest.kt b/src/test/java/skedgo/rxproperty/RxObservableBooleanKtTest.kt index 745c453..5c9fe3b 100644 --- a/src/test/java/skedgo/rxproperty/RxObservableBooleanKtTest.kt +++ b/src/test/java/skedgo/rxproperty/RxObservableBooleanKtTest.kt @@ -1,6 +1,6 @@ package skedgo.rxproperty -import android.databinding.ObservableBoolean +import androidx.databinding.ObservableBoolean import org.junit.Test import rx.observers.TestSubscriber diff --git a/src/test/java/skedgo/rxproperty/RxObservableListKtTest.kt b/src/test/java/skedgo/rxproperty/RxObservableListKtTest.kt index 3ca3168..3f0b1ef 100644 --- a/src/test/java/skedgo/rxproperty/RxObservableListKtTest.kt +++ b/src/test/java/skedgo/rxproperty/RxObservableListKtTest.kt @@ -1,7 +1,7 @@ package skedgo.rxproperty -import android.databinding.ObservableArrayList -import android.databinding.ObservableList +import androidx.databinding.ObservableArrayList +import androidx.databinding.ObservableList import org.junit.Test import rx.observers.TestSubscriber From 72efe09b703157da44d90d39f52e67e55e6548ce Mon Sep 17 00:00:00 2001 From: Emmanuel Lagarrigue Date: Thu, 18 Oct 2018 14:11:29 -0300 Subject: [PATCH 4/9] Fix tests --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index b5aacc4..b53df64 100644 --- a/build.gradle +++ b/build.gradle @@ -49,6 +49,7 @@ android { dependencies { testImplementation "junit:junit:4.12" + testImplementation 'androidx.appcompat:appcompat:1.0.0' implementation "io.reactivex:rxjava:1.3.5" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" } \ No newline at end of file From 8be55be71c98776089d918712d34e61bcd7b8912 Mon Sep 17 00:00:00 2001 From: Tin Tran Date: Tue, 6 Nov 2018 16:38:27 +0700 Subject: [PATCH 5/9] Fix import and travis config --- .travis.yml | 1 + src/main/java/skedgo/rxproperty/RxObservableField.kt | 3 ++- src/main/java/skedgo/rxproperty/RxObservableInt.kt | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b7f921..804feaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ android: # The BuildTools version used by your project - build-tools-27.0.3 + - build-tools-28.0.3 # The SDK version used to compile your project - android-27 diff --git a/src/main/java/skedgo/rxproperty/RxObservableField.kt b/src/main/java/skedgo/rxproperty/RxObservableField.kt index c1a271a..e751c45 100644 --- a/src/main/java/skedgo/rxproperty/RxObservableField.kt +++ b/src/main/java/skedgo/rxproperty/RxObservableField.kt @@ -1,6 +1,7 @@ package skedgo.rxproperty import androidx.databinding.ObservableField +import androidx.databinding.Observable.OnPropertyChangedCallback import rx.Observable import rx.subscriptions.Subscriptions @@ -13,7 +14,7 @@ fun ObservableField.asObservable(): Observable { return Observable.create { // To emit the current value. it.onNext(get()) - val callback = object : androidx.databinding.Observable.OnPropertyChangedCallback() { + val callback = object : OnPropertyChangedCallback() { override fun onPropertyChanged(sender: androidx.databinding.Observable?, propertyId: Int) { it.onNext(get()) } diff --git a/src/main/java/skedgo/rxproperty/RxObservableInt.kt b/src/main/java/skedgo/rxproperty/RxObservableInt.kt index bc31282..9794348 100644 --- a/src/main/java/skedgo/rxproperty/RxObservableInt.kt +++ b/src/main/java/skedgo/rxproperty/RxObservableInt.kt @@ -2,6 +2,7 @@ package skedgo.rxproperty import androidx.databinding.ObservableInt import rx.Observable +import androidx.databinding.Observable.OnPropertyChangedCallback import rx.subscriptions.Subscriptions /** @@ -12,7 +13,7 @@ import rx.subscriptions.Subscriptions fun ObservableInt.asObservable(): Observable = Observable.create { // To emit the current value. it.onNext(get()) - val callback = object : androidx.databinding.Observable.OnPropertyChangedCallback() { + val callback = object : OnPropertyChangedCallback() { override fun onPropertyChanged(sender: androidx.databinding.Observable?, propertyId: Int) { it.onNext(get()) } From 7a49ae8914ebed485f3acfcd98c3acf204c82625 Mon Sep 17 00:00:00 2001 From: Tin Tran Date: Tue, 6 Nov 2018 16:44:33 +0700 Subject: [PATCH 6/9] Compile with 28 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 804feaf..c116a28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ android: # The SDK version used to compile your project - android-27 + - android-28 # Additional components - extra-android-m2repository From 7379da88498cc8ace4c9bded5caef2c00d12071c Mon Sep 17 00:00:00 2001 From: Tin Tran Date: Tue, 6 Nov 2018 16:50:22 +0700 Subject: [PATCH 7/9] Use androidX --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index 9d66213..afc4d7b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ android.databinding.enableV2=true +android.useAndroidX=true From 76308f0f1921371957c91004def2e5c5935a9c96 Mon Sep 17 00:00:00 2001 From: Tin Tran Date: Tue, 6 Nov 2018 16:55:20 +0700 Subject: [PATCH 8/9] Dont need this for test --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index b53df64..b5aacc4 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,6 @@ android { dependencies { testImplementation "junit:junit:4.12" - testImplementation 'androidx.appcompat:appcompat:1.0.0' implementation "io.reactivex:rxjava:1.3.5" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" } \ No newline at end of file From cbba0446dfe510cc24cfd33410f7c9f11f9e26c5 Mon Sep 17 00:00:00 2001 From: Tin Tran Date: Tue, 6 Nov 2018 17:11:08 +0700 Subject: [PATCH 9/9] Fix tests --- build.gradle | 1 + settings.gradle | 1 + 2 files changed, 2 insertions(+) create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle index b5aacc4..789f318 100644 --- a/build.gradle +++ b/build.gradle @@ -50,5 +50,6 @@ android { dependencies { testImplementation "junit:junit:4.12" implementation "io.reactivex:rxjava:1.3.5" + implementation "androidx.core:core:1.0.0" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..78bc81a --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include ':RxProperty' \ No newline at end of file