Depend on latest stable lifecycle prebuilts in Compose
We previously had to add a ToT dependency on lifecycle-common-java8 in
Compose to resolve dependency conflicts where old and new versions both
had a DefaultLifecycleEventObserver classes. see aosp/1805059.
But now that a stable version of this dep has been released, we should
move from ToT to prebuilts to handle this error while we work on
updating the lifecycle dependencies in Compose.
Test: ./gradlew bOS
Change-Id: If004a0d91614ca2e70686884edaeedda69fad38f
diff --git a/activity/activity-compose/samples/build.gradle b/activity/activity-compose/samples/build.gradle
index 740db84..48236d48 100644
--- a/activity/activity-compose/samples/build.gradle
+++ b/activity/activity-compose/samples/build.gradle
@@ -36,7 +36,7 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- implementation projectOrArtifact(":lifecycle:lifecycle-common-java8")
+ implementation "androidx.lifecycle:lifecycle-common-java8:2.5.1"
}
androidx {
diff --git a/compose/foundation/foundation-layout/build.gradle b/compose/foundation/foundation-layout/build.gradle
index f9b51e6..4ce01dd 100644
--- a/compose/foundation/foundation-layout/build.gradle
+++ b/compose/foundation/foundation-layout/build.gradle
@@ -58,7 +58,7 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- androidTestImplementation(project(":lifecycle:lifecycle-common-java8"))
+ androidTestImplementation("androidx.lifecycle:lifecycle-common-java8:2.5.1")
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.junit)
diff --git a/compose/integration-tests/docs-snippets/build.gradle b/compose/integration-tests/docs-snippets/build.gradle
index c6bf227..b2e864f 100644
--- a/compose/integration-tests/docs-snippets/build.gradle
+++ b/compose/integration-tests/docs-snippets/build.gradle
@@ -48,8 +48,8 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- implementation(project(":lifecycle:lifecycle-common-java8"))
- implementation(project(":lifecycle:lifecycle-viewmodel-savedstate"))
+ implementation("androidx.lifecycle:lifecycle-common-java8:2.5.1")
+ implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1")
implementation(project(":paging:paging-compose"))
implementation(libs.kotlinStdlib)
diff --git a/compose/integration-tests/macrobenchmark-target/build.gradle b/compose/integration-tests/macrobenchmark-target/build.gradle
index 379fe42..0a09176 100644
--- a/compose/integration-tests/macrobenchmark-target/build.gradle
+++ b/compose/integration-tests/macrobenchmark-target/build.gradle
@@ -29,7 +29,7 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- implementation projectOrArtifact(":lifecycle:lifecycle-common-java8")
+ implementation "androidx.lifecycle:lifecycle-common-java8:2.5.1"
implementation(project(":compose:foundation:foundation-layout"))
implementation(project(":compose:foundation:foundation"))
implementation(project(":compose:material:material"))
diff --git a/compose/integration-tests/material-catalog/build.gradle b/compose/integration-tests/material-catalog/build.gradle
index e2398cd..c6afe8e 100644
--- a/compose/integration-tests/material-catalog/build.gradle
+++ b/compose/integration-tests/material-catalog/build.gradle
@@ -58,7 +58,7 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- implementation projectOrArtifact(":lifecycle:lifecycle-common-java8")
+ implementation "androidx.lifecycle:lifecycle-common-java8:2.5.1"
}
// We want to publish a release APK of this project for the Compose Material Catalog
diff --git a/compose/runtime/runtime/compose-runtime-benchmark/build.gradle b/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
index 8a99350..ac923ef 100644
--- a/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
+++ b/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
@@ -60,7 +60,7 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- androidTestImplementation projectOrArtifact(":lifecycle:lifecycle-common-java8")
+ androidTestImplementation "androidx.lifecycle:lifecycle-common-java8:2.5.1"
}
androidx {
diff --git a/compose/test-utils/build.gradle b/compose/test-utils/build.gradle
index 4f1ce49..47ef466 100644
--- a/compose/test-utils/build.gradle
+++ b/compose/test-utils/build.gradle
@@ -49,7 +49,7 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- implementation(projectOrArtifact(":lifecycle:lifecycle-common-java8"))
+ implementation("androidx.lifecycle:lifecycle-common-java8:2.5.1")
implementation(libs.testCore)
implementation(libs.testRules)
diff --git a/compose/ui/ui-tooling/build.gradle b/compose/ui/ui-tooling/build.gradle
index 15776c0..f8affb0 100644
--- a/compose/ui/ui-tooling/build.gradle
+++ b/compose/ui/ui-tooling/build.gradle
@@ -107,8 +107,8 @@
// Outside of androidx this is resolved via constraint added to lifecycle-common,
// but it doesn't work in androidx.
// See aosp/1804059
- implementation(project(":lifecycle:lifecycle-common-java8"))
- implementation(project(":lifecycle:lifecycle-viewmodel-savedstate"))
+ implementation("androidx.lifecycle:lifecycle-common-java8:2.5.1")
+ implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1")
implementation(libs.junit)
implementation(libs.testRunner)