Revert "Move LocalLifecycleOwner to common"
This reverts commit 3cbcc1c8dfee03178e9f9e9d223f302de812093e.
Reason for revert: It broke androidx post submit build. https://ci.android.com/builds/submitted/11437497/androidx/latest/view/logs/build_error.log
Change-Id: I64869724614aa25b975ecc2179be56686ef57e49
diff --git a/camera/integration-tests/avsynctestapp/build.gradle b/camera/integration-tests/avsynctestapp/build.gradle
index afc33a1..7bec0da 100644
--- a/camera/integration-tests/avsynctestapp/build.gradle
+++ b/camera/integration-tests/avsynctestapp/build.gradle
@@ -64,9 +64,7 @@
}
// Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
- androidTestImplementation(project(":annotation:annotation"))
androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0")
- androidTestImplementation(project(":lifecycle:lifecycle-common"))
// Testing framework
testImplementation(libs.kotlinCoroutinesTest)
diff --git a/compose/integration-tests/demos/build.gradle b/compose/integration-tests/demos/build.gradle
index 5d6009a..1bfb611 100644
--- a/compose/integration-tests/demos/build.gradle
+++ b/compose/integration-tests/demos/build.gradle
@@ -22,7 +22,6 @@
implementation(project(":navigation:navigation-compose:integration-tests:navigation-demos"))
implementation(project(":paging:paging-compose:integration-tests:paging-demos"))
implementation(project(":compose:ui:ui:integration-tests:ui-demos"))
- implementation(project(":compose:animation:animation-graphics"))
implementation(libs.kotlinReflect)
implementation(libs.kotlinStdlib)
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index 51c3e1d..69ae2b2 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -45,7 +45,6 @@
implementation(libs.kotlinCoroutinesCore)
api("androidx.annotation:annotation:1.6.0")
implementation("androidx.collection:collection:1.4.0")
- implementation(project(":lifecycle:lifecycle-runtime"))
// when updating the runtime version please also update the runtime-saveable version
implementation(project(":compose:runtime:runtime"))
api(project(":compose:runtime:runtime-saveable"))
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidCompositionLocals.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidCompositionLocals.android.kt
index b89e73c..be22bd7 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidCompositionLocals.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidCompositionLocals.android.kt
@@ -63,7 +63,7 @@
/**
* The CompositionLocal containing the current [LifecycleOwner].
*/
-actual val LocalLifecycleOwner = staticCompositionLocalOf<LifecycleOwner> {
+val LocalLifecycleOwner = staticCompositionLocalOf<LifecycleOwner> {
noLocalProvidedFor("LocalLifecycleOwner")
}
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
index a13a0e8..6006c51 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
@@ -22,7 +22,6 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocal
import androidx.compose.runtime.CompositionLocalProvider
-import androidx.compose.runtime.ProvidableCompositionLocal
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.autofill.Autofill
@@ -39,7 +38,6 @@
import androidx.compose.ui.text.input.TextInputService
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.LayoutDirection
-import androidx.lifecycle.LifecycleOwner
/**
* The CompositionLocal to provide communication with platform accessibility service.
@@ -177,11 +175,6 @@
noLocalProvidedFor("LocalWindowInfo")
}
-/**
- * The CompositionLocal containing the current [LifecycleOwner].
- */
-expect val LocalLifecycleOwner: ProvidableCompositionLocal<LifecycleOwner>
-
internal val LocalPointerIconService = staticCompositionLocalOf<PointerIconService?> {
null
}
diff --git a/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/CompositionLocals.skiko.kt b/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/CompositionLocals.skiko.kt
deleted file mode 100644
index a4023f3..0000000
--- a/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/CompositionLocals.skiko.kt
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package androidx.compose.ui.platform
-
-import androidx.compose.runtime.staticCompositionLocalOf
-import androidx.lifecycle.LifecycleOwner
-
-/**
- * The CompositionLocal containing the current [LifecycleOwner].
- */
-actual val LocalLifecycleOwner = staticCompositionLocalOf<LifecycleOwner> {
- noLocalProvidedFor("LocalLifecycleOwner")
-}
-
-@Suppress("SameParameterValue")
-private fun noLocalProvidedFor(name: String): Nothing {
- error("CompositionLocal $name not present")
-}
diff --git a/wear/compose/integration-tests/navigation/build.gradle b/wear/compose/integration-tests/navigation/build.gradle
index 3adc743..46a2548 100644
--- a/wear/compose/integration-tests/navigation/build.gradle
+++ b/wear/compose/integration-tests/navigation/build.gradle
@@ -53,7 +53,7 @@
implementation(project(":wear:compose:compose-material-samples"))
implementation(project(':wear:compose:compose-navigation'))
- androidTestImplementation(project(":lifecycle:lifecycle-common"))
+ androidTestImplementation("androidx.lifecycle:lifecycle-common:2.7.0")
// Uses project dependency to match collections/compose-runtime
- androidTestImplementation(project(":annotation:annotation"))
+ androidTestImplementation api("androidx.annotation:annotation:1.7.0")
}
\ No newline at end of file