From 3a482111cca1426d68faca779205fdb5b9ef4fe0 Mon Sep 17 00:00:00 2001 From: Min Hiew Date: Wed, 12 Feb 2025 14:56:11 -0500 Subject: [PATCH 1/2] [DNM] Enable Stability Flags on Screen and ComposeScreen --- .../java/com/squareup/workflow1/ui/compose/ComposeScreen.kt | 2 ++ workflow-ui/core-common/build.gradle.kts | 4 ++++ .../src/main/java/com/squareup/workflow1/ui/Screen.kt | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/workflow-ui/compose/src/main/java/com/squareup/workflow1/ui/compose/ComposeScreen.kt b/workflow-ui/compose/src/main/java/com/squareup/workflow1/ui/compose/ComposeScreen.kt index c61b58f7f6..a64a84cd31 100644 --- a/workflow-ui/compose/src/main/java/com/squareup/workflow1/ui/compose/ComposeScreen.kt +++ b/workflow-ui/compose/src/main/java/com/squareup/workflow1/ui/compose/ComposeScreen.kt @@ -1,6 +1,7 @@ package com.squareup.workflow1.ui.compose import androidx.compose.runtime.Composable +import androidx.compose.runtime.Stable import com.squareup.workflow1.ui.Screen import com.squareup.workflow1.ui.ViewEnvironment import com.squareup.workflow1.ui.ViewRegistry @@ -73,6 +74,7 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi * will be wrapped with the [CompositionRoot]. See the documentation on [CompositionRoot] for * more information. */ +@Stable @WorkflowUiExperimentalApi public interface ComposeScreen : Screen { diff --git a/workflow-ui/core-common/build.gradle.kts b/workflow-ui/core-common/build.gradle.kts index 6e559e19bf..25270e9902 100644 --- a/workflow-ui/core-common/build.gradle.kts +++ b/workflow-ui/core-common/build.gradle.kts @@ -4,9 +4,13 @@ plugins { } dependencies { + val composeBom = platform(libs.androidx.compose.bom) + implementation(composeBom) + api(libs.kotlin.jdk6) api(libs.kotlinx.coroutines.core) api(libs.squareup.okio) + api(libs.androidx.compose.runtime) testImplementation(libs.junit) testImplementation(libs.kotlin.test.core) diff --git a/workflow-ui/core-common/src/main/java/com/squareup/workflow1/ui/Screen.kt b/workflow-ui/core-common/src/main/java/com/squareup/workflow1/ui/Screen.kt index 37b586e8aa..1eb8138e61 100644 --- a/workflow-ui/core-common/src/main/java/com/squareup/workflow1/ui/Screen.kt +++ b/workflow-ui/core-common/src/main/java/com/squareup/workflow1/ui/Screen.kt @@ -1,7 +1,11 @@ package com.squareup.workflow1.ui +import androidx.compose.runtime.Stable + /** * Marker interface implemented by renderings that map to a UI system's 2d view class. */ + +@Stable @WorkflowUiExperimentalApi public interface Screen From 905579cc39061f595e011556cd114330327ba0f5 Mon Sep 17 00:00:00 2001 From: mhiew Date: Thu, 13 Feb 2025 01:41:24 +0000 Subject: [PATCH 2/2] Apply changes from dependencyGuardBaseline --refresh-dependencies Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../core-android/dependencies/releaseRuntimeClasspath.txt | 8 ++++++-- workflow-ui/core-common/dependencies/runtimeClasspath.txt | 7 +++++++ .../radiography/dependencies/releaseRuntimeClasspath.txt | 8 ++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt b/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt index c6b005f5a5..f6652af568 100644 --- a/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt +++ b/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt @@ -1,10 +1,14 @@ androidx.activity:activity:1.8.2 -androidx.annotation:annotation-experimental:1.4.0 +androidx.annotation:annotation-experimental:1.4.1 androidx.annotation:annotation-jvm:1.8.1 androidx.annotation:annotation:1.8.1 androidx.arch.core:core-common:2.2.0 androidx.arch.core:core-runtime:2.2.0 -androidx.collection:collection:1.1.0 +androidx.collection:collection-jvm:1.4.4 +androidx.collection:collection:1.4.4 +androidx.compose.runtime:runtime-android:1.7.2 +androidx.compose.runtime:runtime:1.7.2 +androidx.compose:compose-bom:2024.09.02 androidx.concurrent:concurrent-futures:1.1.0 androidx.core:core-ktx:1.13.1 androidx.core:core:1.13.1 diff --git a/workflow-ui/core-common/dependencies/runtimeClasspath.txt b/workflow-ui/core-common/dependencies/runtimeClasspath.txt index 3d72a2ba12..738208312d 100644 --- a/workflow-ui/core-common/dependencies/runtimeClasspath.txt +++ b/workflow-ui/core-common/dependencies/runtimeClasspath.txt @@ -1,3 +1,10 @@ +androidx.annotation:annotation-jvm:1.8.1 +androidx.annotation:annotation:1.8.1 +androidx.collection:collection-jvm:1.4.4 +androidx.collection:collection:1.4.4 +androidx.compose.runtime:runtime-jvmstubs:1.7.2 +androidx.compose.runtime:runtime:1.7.2 +androidx.compose:compose-bom:2024.09.02 com.squareup.okio:okio-jvm:3.3.0 com.squareup.okio:okio:3.3.0 org.jetbrains.kotlin:kotlin-bom:1.9.24 diff --git a/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt b/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt index 4db9475ce7..29c099d781 100644 --- a/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt +++ b/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt @@ -1,10 +1,14 @@ androidx.activity:activity:1.8.2 -androidx.annotation:annotation-experimental:1.4.0 +androidx.annotation:annotation-experimental:1.4.1 androidx.annotation:annotation-jvm:1.8.1 androidx.annotation:annotation:1.8.1 androidx.arch.core:core-common:2.2.0 androidx.arch.core:core-runtime:2.2.0 -androidx.collection:collection:1.1.0 +androidx.collection:collection-jvm:1.4.4 +androidx.collection:collection:1.4.4 +androidx.compose.runtime:runtime-android:1.7.2 +androidx.compose.runtime:runtime:1.7.2 +androidx.compose:compose-bom:2024.09.02 androidx.concurrent:concurrent-futures:1.1.0 androidx.core:core-ktx:1.13.1 androidx.core:core:1.13.1