From 540edcb3d752b711964a93ab15ca84babb998f57 Mon Sep 17 00:00:00 2001 From: Stephen Edwards Date: Mon, 16 Dec 2024 17:01:27 -0500 Subject: [PATCH] Update androidx library versions --- dependencies/classpath.txt | 2 +- gradle/libs.versions.toml | 31 ++++++++++--------- .../dependencies/releaseRuntimeClasspath.txt | 16 +++++++--- .../dependencies/releaseRuntimeClasspath.txt | 20 ++++++++---- .../dependencies/releaseRuntimeClasspath.txt | 18 ++++++++--- .../ui/navigation/ViewStateCacheTest.kt | 3 +- .../workflow1/ui/navigation/DialogSession.kt | 13 +++++--- .../workflow1/ui/WorkflowLayoutTest.kt | 13 +++++--- ...orkflowSavedStateRegistryAggregatorTest.kt | 5 ++- .../dependencies/releaseRuntimeClasspath.txt | 18 ++++++++--- 10 files changed, 92 insertions(+), 47 deletions(-) diff --git a/dependencies/classpath.txt b/dependencies/classpath.txt index 6f5edc484..fc2b08750 100644 --- a/dependencies/classpath.txt +++ b/dependencies/classpath.txt @@ -41,7 +41,7 @@ com.android.tools:sdk-common:31.1.2 com.android.tools:sdklib:31.1.2 com.android:signflinger:8.1.2 com.android:zipflinger:8.1.2 -com.dropbox.dependency-guard:dependency-guard:0.4.3 +com.dropbox.dependency-guard:dependency-guard:0.5.0 com.fasterxml.jackson.core:jackson-annotations:2.12.7 com.fasterxml.jackson.core:jackson-core:2.12.7 com.fasterxml.jackson.core:jackson-databind:2.12.7.1 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2fd07d6fb..9b988262f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -androidTools = "8.1.2" +agpVersion = "8.1.2" compileSdk = "34" minSdk = "24" @@ -9,36 +9,37 @@ targetSdk = "33" jdk-target = "1.8" jdk-toolchain = "17" -androidx-activity = "1.6.1" -androidx-appcompat = "1.6.1" -androidx-benchmark = "1.2.3" +androidx-activity = "1.8.2" +androidx-appcompat = "1.7.0" +androidx-benchmark = "1.3.3" androidx-cardview = "1.0.0" androidx-compose-compiler = "1.5.14" # see https://developer.android.com/jetpack/compose/bom/bom-mapping androidx-compose-bom = "2024.09.02" androidx-constraintlayout = "2.1.4" -androidx-core = "1.12.0" -androidx-fragment = "1.3.6" +androidx-core = "1.13.1" +androidx-fragment = "1.8.5" androidx-gridlayout = "1.0.0" androidx-lifecycle = "2.8.7" -androidx-navigation = "2.4.0-alpha09" +androidx-navigation = "2.8.4" androidx-paging = "3.0.1" androidx-profileinstaller = "1.2.0-alpha02" androidx-recyclerview = "1.3.2" androidx-room = "2.4.0-alpha04" androidx-savedstate = "1.2.1" androidx-startup = "1.1.0" -androidx-test = "1.5.0" +androidx-test = "1.6.1" androidx-test-espresso = "3.5.1" androidx-test-junit-ext = "1.1.5" androidx-test-runner = "1.5.2" androidx-test-truth-ext = "1.5.0" -androidx-tracing = "1.1.0" -androidx-transition = "1.4.1" +androidx-tracing = "1.2.0" +androidx-transition = "1.5.1" +androidx-viewbinding = "8.1.2" detekt = "1.19.0" dokka = "1.9.10" -dependencyGuard = "0.4.3" +dependencyGuard = "0.5.0" google-accompanist = "0.18.0" google-dagger = "2.40.5" @@ -75,7 +76,7 @@ rxjava2-core = "2.2.21" squareup-curtains = "1.2.5" squareup-cycler = "0.1.9" -squareup-leakcanary = "2.12" +squareup-leakcanary = "3.0-alpha-8" squareup-moshi = "1.15.0" squareup-okhttp = "4.9.1" squareup-okio = "3.3.0" @@ -85,7 +86,7 @@ squareup-seismic = "1.0.3" squareup-workflow = "1.0.0" timber = "5.0.1" -truth = "1.1.5" +truth = "1.4.4" turbine = "1.0.0" vanniktech-publish = "0.27.0" @@ -106,7 +107,7 @@ mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech- [libraries] -android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "androidTools" } +android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agpVersion" } androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" } androidx-activity-core = { module = "androidx.activity:activity", version.ref = "androidx-activity" } @@ -176,7 +177,7 @@ androidx-tracing-ktx = { module = "androidx.tracing:tracing-ktx", version.ref = androidx-transition = { module = "androidx.transition:transition", version.ref = "androidx-transition" } -androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.ref = "androidTools" } +androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.ref = "androidx-viewbinding" } dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" } diff --git a/workflow-ui/compose-tooling/dependencies/releaseRuntimeClasspath.txt b/workflow-ui/compose-tooling/dependencies/releaseRuntimeClasspath.txt index ab87636c7..a3591f233 100644 --- a/workflow-ui/compose-tooling/dependencies/releaseRuntimeClasspath.txt +++ b/workflow-ui/compose-tooling/dependencies/releaseRuntimeClasspath.txt @@ -1,6 +1,6 @@ -androidx.activity:activity-compose:1.7.0 -androidx.activity:activity-ktx:1.7.0 -androidx.activity:activity:1.7.0 +androidx.activity:activity-compose:1.8.2 +androidx.activity:activity-ktx:1.8.2 +androidx.activity:activity:1.8.2 androidx.annotation:annotation-experimental:1.4.1 androidx.annotation:annotation-jvm:1.8.1 androidx.annotation:annotation:1.8.1 @@ -41,12 +41,17 @@ androidx.concurrent:concurrent-futures:1.1.0 androidx.core:core-ktx:1.13.1 androidx.core:core:1.13.1 androidx.customview:customview-poolingcontainer:1.0.0 +androidx.documentfile:documentfile:1.0.0 +androidx.dynamicanimation:dynamicanimation:1.0.0 androidx.emoji2:emoji2:1.3.0 androidx.graphics:graphics-path:1.0.1 androidx.interpolator:interpolator:1.0.0 +androidx.legacy:legacy-support-core-utils:1.0.0 androidx.lifecycle:lifecycle-common-jvm:2.8.7 androidx.lifecycle:lifecycle-common:2.8.7 +androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.7 androidx.lifecycle:lifecycle-livedata-core:2.8.7 +androidx.lifecycle:lifecycle-livedata:2.8.7 androidx.lifecycle:lifecycle-process:2.8.7 androidx.lifecycle:lifecycle-runtime-android:2.8.7 androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7 @@ -58,12 +63,15 @@ androidx.lifecycle:lifecycle-viewmodel-android:2.8.7 androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7 androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7 androidx.lifecycle:lifecycle-viewmodel:2.8.7 +androidx.loader:loader:1.0.0 +androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 +androidx.print:print:1.0.0 androidx.profileinstaller:profileinstaller:1.3.1 androidx.savedstate:savedstate-ktx:1.2.1 androidx.savedstate:savedstate:1.2.1 androidx.startup:startup-runtime:1.1.1 androidx.tracing:tracing:1.0.0 -androidx.transition:transition:1.4.1 +androidx.transition:transition:1.5.1 androidx.versionedparcelable:versionedparcelable:1.1.1 com.google.guava:listenablefuture:1.0 com.squareup.okio:okio-jvm:3.3.0 diff --git a/workflow-ui/compose/dependencies/releaseRuntimeClasspath.txt b/workflow-ui/compose/dependencies/releaseRuntimeClasspath.txt index ea073ca7b..36a24d66d 100644 --- a/workflow-ui/compose/dependencies/releaseRuntimeClasspath.txt +++ b/workflow-ui/compose/dependencies/releaseRuntimeClasspath.txt @@ -1,6 +1,6 @@ -androidx.activity:activity-compose:1.7.0 -androidx.activity:activity-ktx:1.7.0 -androidx.activity:activity:1.7.0 +androidx.activity:activity-compose:1.8.2 +androidx.activity:activity-ktx:1.8.2 +androidx.activity:activity:1.8.2 androidx.annotation:annotation-experimental:1.4.1 androidx.annotation:annotation-jvm:1.8.1 androidx.annotation:annotation:1.8.1 @@ -32,15 +32,20 @@ androidx.compose.ui:ui-util:1.7.2 androidx.compose.ui:ui:1.7.2 androidx.compose:compose-bom:2024.09.02 androidx.concurrent:concurrent-futures:1.1.0 -androidx.core:core-ktx:1.12.0 -androidx.core:core:1.12.0 +androidx.core:core-ktx:1.13.1 +androidx.core:core:1.13.1 androidx.customview:customview-poolingcontainer:1.0.0 +androidx.documentfile:documentfile:1.0.0 +androidx.dynamicanimation:dynamicanimation:1.0.0 androidx.emoji2:emoji2:1.2.0 androidx.graphics:graphics-path:1.0.1 androidx.interpolator:interpolator:1.0.0 +androidx.legacy:legacy-support-core-utils:1.0.0 androidx.lifecycle:lifecycle-common-jvm:2.8.7 androidx.lifecycle:lifecycle-common:2.8.7 +androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.7 androidx.lifecycle:lifecycle-livedata-core:2.8.7 +androidx.lifecycle:lifecycle-livedata:2.8.7 androidx.lifecycle:lifecycle-process:2.8.7 androidx.lifecycle:lifecycle-runtime-android:2.8.7 androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7 @@ -52,12 +57,15 @@ androidx.lifecycle:lifecycle-viewmodel-android:2.8.7 androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7 androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7 androidx.lifecycle:lifecycle-viewmodel:2.8.7 +androidx.loader:loader:1.0.0 +androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 +androidx.print:print:1.0.0 androidx.profileinstaller:profileinstaller:1.3.1 androidx.savedstate:savedstate-ktx:1.2.1 androidx.savedstate:savedstate:1.2.1 androidx.startup:startup-runtime:1.1.1 androidx.tracing:tracing:1.0.0 -androidx.transition:transition:1.4.1 +androidx.transition:transition:1.5.1 androidx.versionedparcelable:versionedparcelable:1.1.1 com.google.guava:listenablefuture:1.0 com.squareup.okio:okio-jvm:3.3.0 diff --git a/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt b/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt index b97fa8101..c6b005f5a 100644 --- a/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt +++ b/workflow-ui/core-android/dependencies/releaseRuntimeClasspath.txt @@ -1,17 +1,22 @@ -androidx.activity:activity:1.6.1 -androidx.annotation:annotation-experimental:1.3.0 +androidx.activity:activity:1.8.2 +androidx.annotation:annotation-experimental:1.4.0 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.concurrent:concurrent-futures:1.1.0 -androidx.core:core-ktx:1.12.0 -androidx.core:core:1.12.0 +androidx.core:core-ktx:1.13.1 +androidx.core:core:1.13.1 +androidx.documentfile:documentfile:1.0.0 +androidx.dynamicanimation:dynamicanimation:1.0.0 androidx.interpolator:interpolator:1.0.0 +androidx.legacy:legacy-support-core-utils:1.0.0 androidx.lifecycle:lifecycle-common-jvm:2.8.7 androidx.lifecycle:lifecycle-common:2.8.7 +androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.7 androidx.lifecycle:lifecycle-livedata-core:2.8.7 +androidx.lifecycle:lifecycle-livedata:2.8.7 androidx.lifecycle:lifecycle-runtime-android:2.8.7 androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7 androidx.lifecycle:lifecycle-runtime-ktx:2.8.7 @@ -19,11 +24,14 @@ androidx.lifecycle:lifecycle-runtime:2.8.7 androidx.lifecycle:lifecycle-viewmodel-android:2.8.7 androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7 androidx.lifecycle:lifecycle-viewmodel:2.8.7 +androidx.loader:loader:1.0.0 +androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 +androidx.print:print:1.0.0 androidx.profileinstaller:profileinstaller:1.3.1 androidx.savedstate:savedstate:1.2.1 androidx.startup:startup-runtime:1.1.1 androidx.tracing:tracing:1.0.0 -androidx.transition:transition:1.4.1 +androidx.transition:transition:1.5.1 androidx.versionedparcelable:versionedparcelable:1.1.1 com.google.guava:listenablefuture:1.0 com.squareup.okio:okio-jvm:3.3.0 diff --git a/workflow-ui/core-android/src/androidTest/java/com/squareup/workflow1/ui/navigation/ViewStateCacheTest.kt b/workflow-ui/core-android/src/androidTest/java/com/squareup/workflow1/ui/navigation/ViewStateCacheTest.kt index a44ffba67..f0e1f2988 100644 --- a/workflow-ui/core-android/src/androidTest/java/com/squareup/workflow1/ui/navigation/ViewStateCacheTest.kt +++ b/workflow-ui/core-android/src/androidTest/java/com/squareup/workflow1/ui/navigation/ViewStateCacheTest.kt @@ -39,7 +39,8 @@ internal class ViewStateCacheTest { override val lifecycle: Lifecycle get() = error("") - override fun getOnBackPressedDispatcher(): OnBackPressedDispatcher = error("") + override val onBackPressedDispatcher: OnBackPressedDispatcher + get() = error("") } private object AScreen : Screen diff --git a/workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/navigation/DialogSession.kt b/workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/navigation/DialogSession.kt index 2f10d858f..a20d5ea49 100644 --- a/workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/navigation/DialogSession.kt +++ b/workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/navigation/DialogSession.kt @@ -150,12 +150,15 @@ internal class DialogSession( val onBack = (dialog as? OnBackPressedDispatcherOwner) ?: holder.environment.map[OnBackPressedDispatcherOwnerKey] as? OnBackPressedDispatcherOwner ?: decorView.onBackPressedDispatcherOwnerOrNull() - ?: object : OnBackPressedDispatcherOwner { - override val lifecycle: Lifecycle - get() = error("To support back press handling extend ComponentDialog: $dialog") + ?: run { + @Suppress("UNREACHABLE_CODE") + object : OnBackPressedDispatcherOwner { + override val lifecycle: Lifecycle + get() = error("To support back press handling extend ComponentDialog: $dialog") - override fun getOnBackPressedDispatcher(): OnBackPressedDispatcher = - error("To support back press handling extend ComponentDialog: $dialog") + override val onBackPressedDispatcher: OnBackPressedDispatcher = + error("To support back press handling extend ComponentDialog: $dialog") + } } // Implementations of buildDialog may set their own WorkflowLifecycleOwner on the diff --git a/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/WorkflowLayoutTest.kt b/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/WorkflowLayoutTest.kt index d12c98dc6..0037314c1 100644 --- a/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/WorkflowLayoutTest.kt +++ b/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/WorkflowLayoutTest.kt @@ -36,9 +36,11 @@ internal class WorkflowLayoutTest { private val workflowLayout = WorkflowLayout(context).apply { id = 42 setViewTreeOnBackPressedDispatcherOwner(object : OnBackPressedDispatcherOwner { - override fun getOnBackPressedDispatcher(): OnBackPressedDispatcher { - error("yeah no") - } + override val onBackPressedDispatcher: OnBackPressedDispatcher + get() { + error("yeah no") + } + override val lifecycle: Lifecycle get() = error("nope") }) } @@ -70,7 +72,10 @@ internal class WorkflowLayoutTest { } val onBack = object : OnBackPressedDispatcherOwner { - override fun getOnBackPressedDispatcher() = error("nope") + override val onBackPressedDispatcher: OnBackPressedDispatcher + get() { + error("nope") + } override val lifecycle: Lifecycle get() = error("also nope") } diff --git a/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistryAggregatorTest.kt b/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistryAggregatorTest.kt index 9939c59db..df6059bb5 100644 --- a/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistryAggregatorTest.kt +++ b/workflow-ui/core-android/src/test/java/com/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistryAggregatorTest.kt @@ -27,7 +27,10 @@ internal class WorkflowSavedStateRegistryAggregatorTest { private val fakeOnBack = object : OnBackPressedDispatcherOwner { override val lifecycle: Lifecycle get() = error("") - override fun getOnBackPressedDispatcher(): OnBackPressedDispatcher = error("") + override val onBackPressedDispatcher: OnBackPressedDispatcher + get() { + error("") + } } @Test fun `attach stops observing previous parent when called multiple times without detach`() { diff --git a/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt b/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt index 07a27f05e..4db9475ce 100644 --- a/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt +++ b/workflow-ui/radiography/dependencies/releaseRuntimeClasspath.txt @@ -1,17 +1,22 @@ -androidx.activity:activity:1.6.1 -androidx.annotation:annotation-experimental:1.3.0 +androidx.activity:activity:1.8.2 +androidx.annotation:annotation-experimental:1.4.0 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.concurrent:concurrent-futures:1.1.0 -androidx.core:core-ktx:1.12.0 -androidx.core:core:1.12.0 +androidx.core:core-ktx:1.13.1 +androidx.core:core:1.13.1 +androidx.documentfile:documentfile:1.0.0 +androidx.dynamicanimation:dynamicanimation:1.0.0 androidx.interpolator:interpolator:1.0.0 +androidx.legacy:legacy-support-core-utils:1.0.0 androidx.lifecycle:lifecycle-common-jvm:2.8.7 androidx.lifecycle:lifecycle-common:2.8.7 +androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.7 androidx.lifecycle:lifecycle-livedata-core:2.8.7 +androidx.lifecycle:lifecycle-livedata:2.8.7 androidx.lifecycle:lifecycle-runtime-android:2.8.7 androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7 androidx.lifecycle:lifecycle-runtime-ktx:2.8.7 @@ -19,11 +24,14 @@ androidx.lifecycle:lifecycle-runtime:2.8.7 androidx.lifecycle:lifecycle-viewmodel-android:2.8.7 androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7 androidx.lifecycle:lifecycle-viewmodel:2.8.7 +androidx.loader:loader:1.0.0 +androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 +androidx.print:print:1.0.0 androidx.profileinstaller:profileinstaller:1.3.1 androidx.savedstate:savedstate:1.2.1 androidx.startup:startup-runtime:1.1.1 androidx.tracing:tracing:1.0.0 -androidx.transition:transition:1.4.1 +androidx.transition:transition:1.5.1 androidx.versionedparcelable:versionedparcelable:1.1.1 com.google.guava:listenablefuture:1.0 com.squareup.curtains:curtains:1.2.2