From bcf365864d08f91325ebaaec4efca7229d5f8f28 Mon Sep 17 00:00:00 2001 From: Yigit Boyar Date: Mon, 20 Sep 2021 22:23:08 -0700 Subject: Unroll deprecated lifecycle-extensions dependency This CL updates data binding runtime dependencies to not depend on deprecated lifecycle-extensions. It was rather a wrapper to get consistent dependencies for other lifecycle artifacts but since that package is deprecated, it is useless. I thought about updating dependencies to more recent versions but that might affect apps. Instead, I just unrolled to remove the deprecated dependency. Fixes: 197553072 Test: existing tests Change-Id: I6c3482ee21d6c0f650c46e4e6fe92d689dfa2601 --- extensions/build.gradle | 8 +++++++- extensions/databindingKtx/build.gradle | 7 ++++++- extensions/library/build.gradle | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/extensions/build.gradle b/extensions/build.gradle index 0cc1e6c5..98751ea6 100644 --- a/extensions/build.gradle +++ b/extensions/build.gradle @@ -120,7 +120,13 @@ buildscript { ext.libs.android_support_collection = "androidx.collection:collection:$supportLibVersion" ext.libs.android_support_cardview_v7 = "androidx.cardview:cardview:$supportLibVersion" ext.libs.android_support_appcompat_v7 = "androidx.appcompat:appcompat:$supportLibVersion" - ext.libs.android_arch_lifecycle_extensions = "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion" + ext.libs.fragments = "androidx.fragment:fragment:1.2.0" + // some of these lifecycle deps are unnecessary but we are keeping them to stay backwards + // compatible with the lifecycle-extensions dependency + ext.libs.lifecycle_livedata = "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion" + ext.libs.lifecycle_process = "androidx.lifecycle:lifecycle-process:$lifecycleVersion" + ext.libs.lifecycle_service = "androidx.lifecycle:lifecycle-service:$lifecycleVersion" + ext.libs.lifecycle_viewmodel = "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion" ext.libs.android_arch_lifecycle_runtime = "androidx.lifecycle:lifecycle-runtime:$lifecycleVersion" ext.libs.android_arch_lifecycle_runtime_ktx = "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion" ext.libs.kotlin_gradle_plugin = dependencyProperties.kotlin_gradle_plugin diff --git a/extensions/databindingKtx/build.gradle b/extensions/databindingKtx/build.gradle index 1563a94f..b380b8d1 100644 --- a/extensions/databindingKtx/build.gradle +++ b/extensions/databindingKtx/build.gradle @@ -55,8 +55,13 @@ dependencies { implementation project(':library') implementation rootProject.ext.libs.kotlin_stdlib api rootProject.ext.libs.coroutines - api rootProject.ext.libs.android_arch_lifecycle_extensions api rootProject.ext.libs.android_arch_lifecycle_runtime_ktx + // some of these lifecycle deps are unnecessary but we are keeping them to stay backwards + // compatible with the lifecycle-extensions dependency + api rootProject.libs.lifecycle_livedata + api rootProject.libs.lifecycle_process + api rootProject.libs.lifecycle_service + api rootProject.libs.lifecycle_viewmodel } //create jar tasks diff --git a/extensions/library/build.gradle b/extensions/library/build.gradle index 5ffb0b1b..e37cd171 100644 --- a/extensions/library/build.gradle +++ b/extensions/library/build.gradle @@ -70,7 +70,8 @@ dependencies { api "androidx.databinding:databinding-common:${dataBindingConfig.version}" api project(':viewbinding') api rootProject.ext.libs.android_arch_lifecycle_runtime - compileOnly rootProject.ext.libs.android_arch_lifecycle_extensions + compileOnly rootProject.ext.libs.lifecycle_livedata + compileOnly rootProject.ext.libs.fragments } //create jar tasks -- cgit v1.2.3