From c28dde1b696ef5e3b881e8307ff92e542d9f6bf1 Mon Sep 17 00:00:00 2001 From: Dale Hawkins <107309+dkhawk@users.noreply.github.com> Date: Mon, 13 Jul 2026 16:30:47 -0600 Subject: [PATCH] build(deps): update dependencies across android-samples --- ApiDemos/project/common-ui/build.gradle.kts | 1 + ApiDemos/project/java-app/build.gradle.kts | 1 + ApiDemos/project/kotlin-app/build.gradle.kts | 1 + .../kotlindemos/truth/LatLngBoundsSubject.kt | 6 ++-- .../kotlindemos/truth/LatLngSubject.kt | 8 +++--- FireMarkers/app/build.gradle.kts | 1 + WearOS/Wearable/build.gradle.kts | 1 + gradle/libs.versions.toml | 28 ++++++++++--------- 8 files changed, 27 insertions(+), 20 deletions(-) diff --git a/ApiDemos/project/common-ui/build.gradle.kts b/ApiDemos/project/common-ui/build.gradle.kts index dfcd8352b..00a05cb7f 100644 --- a/ApiDemos/project/common-ui/build.gradle.kts +++ b/ApiDemos/project/common-ui/build.gradle.kts @@ -71,6 +71,7 @@ dependencies { implementation(libs.material) implementation(libs.play.services.maps) testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.junit) androidTestImplementation(libs.espresso.core) } \ No newline at end of file diff --git a/ApiDemos/project/java-app/build.gradle.kts b/ApiDemos/project/java-app/build.gradle.kts index 6d278e86f..428650ae9 100644 --- a/ApiDemos/project/java-app/build.gradle.kts +++ b/ApiDemos/project/java-app/build.gradle.kts @@ -78,6 +78,7 @@ dependencies { // Tests testImplementation(libs.junit) androidTestImplementation(libs.espresso.idling.resource) + androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.junit) androidTestImplementation(libs.espresso.core) androidTestImplementation(libs.truth) diff --git a/ApiDemos/project/kotlin-app/build.gradle.kts b/ApiDemos/project/kotlin-app/build.gradle.kts index 76cd6784e..1843f0d04 100644 --- a/ApiDemos/project/kotlin-app/build.gradle.kts +++ b/ApiDemos/project/kotlin-app/build.gradle.kts @@ -94,6 +94,7 @@ dependencies { // Tests testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.junit) androidTestImplementation(libs.espresso.core) androidTestImplementation(libs.truth) diff --git a/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngBoundsSubject.kt b/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngBoundsSubject.kt index 2937bbc1b..50bc2b705 100644 --- a/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngBoundsSubject.kt +++ b/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngBoundsSubject.kt @@ -26,7 +26,7 @@ import com.google.common.truth.Truth */ class LatLngBoundsSubject private constructor( failureMetadata: FailureMetadata, - private val actual: LatLngBounds + private val actual: LatLngBounds? ) : Subject(failureMetadata, actual) { /** @@ -35,8 +35,8 @@ class LatLngBoundsSubject private constructor( */ fun containsWithTolerance(expected: LatLng) { val tolerance = 1e-5 - val contains = actual.southwest.latitude - tolerance <= expected.latitude && - expected.latitude <= actual.northeast.latitude + tolerance && + val contains = actual!!.southwest.latitude - tolerance <= expected.latitude && + expected.latitude <= actual!!.northeast.latitude + tolerance && isLongitudeWithinBounds(expected.longitude, actual, tolerance) if (!contains) { failWithActual("expected to contain", expected) diff --git a/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngSubject.kt b/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngSubject.kt index 73ed69ad0..5516ae05c 100644 --- a/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngSubject.kt +++ b/ApiDemos/project/kotlin-app/src/androidTest/java/com/example/kotlindemos/truth/LatLngSubject.kt @@ -32,7 +32,7 @@ import kotlin.math.abs */ class LatLngSubject private constructor( failureMetadata: FailureMetadata, - private val actual: LatLng + private val actual: LatLng? ) : Subject(failureMetadata, actual) { /** @@ -41,8 +41,8 @@ class LatLngSubject private constructor( */ fun isNear(expected: LatLng) { val tolerance = 1e-6 - if (abs(actual.latitude - expected.latitude) > tolerance || - abs(actual.longitude - expected.longitude) > tolerance + if (abs(actual!!.latitude - expected.latitude) > tolerance || + abs(actual!!.longitude - expected.longitude) > tolerance ) { failWithActual("expected to be near", expected) } @@ -63,7 +63,7 @@ class LatLngSubject private constructor( * Asserts that the actual [LatLng] is within [tolerance] meters of the [expected] [LatLng]. */ fun of(expected: LatLng) { - val distance = SphericalUtil.computeDistanceBetween(actual, expected) + val distance = SphericalUtil.computeDistanceBetween(actual!!, expected) if (distance > tolerance) { failWithActual("expected to be within $tolerance meters of $expected [was $distance meters away]", expected) } diff --git a/FireMarkers/app/build.gradle.kts b/FireMarkers/app/build.gradle.kts index eb56c8aff..a5aaa6307 100644 --- a/FireMarkers/app/build.gradle.kts +++ b/FireMarkers/app/build.gradle.kts @@ -179,6 +179,7 @@ dependencies { // AndroidX Test libraries for JUnit and Espresso, as well as Compose-specific testing tools // for UI testing. // --------------------------------------------------------------------------------------------- + androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.junit) androidTestImplementation(libs.espresso.core) androidTestImplementation(platform(libs.compose.bom)) diff --git a/WearOS/Wearable/build.gradle.kts b/WearOS/Wearable/build.gradle.kts index d7670782a..1237e360c 100644 --- a/WearOS/Wearable/build.gradle.kts +++ b/WearOS/Wearable/build.gradle.kts @@ -84,6 +84,7 @@ dependencies { androidTestImplementation(libs.espresso.core) androidTestImplementation(libs.uiautomator) androidTestImplementation(libs.truth) + androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.junit) // If your project does not use a version catalog, you can use the following dependencies instead: diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c0f0ae9dd..f1fcb5061 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,39 +11,39 @@ javaVersion = "17" # Kotlin & Coroutines kotlin = "2.2.0" kotlinxCoroutinesTest = "1.10.2" -kotlinxDatetime = "0.7.1" +kotlinxDatetime = "0.8.0" ksp = "2.2.20-2.0.4" # AndroidX Core & Jetpack -activity = "1.12.2" -activityKtx = "1.12.2" +activity = "1.13.0" +activityKtx = "1.13.0" androidxJunit = "1.3.0" # Test ext appcompat = "1.7.1" cardview = "1.0.0" constraintlayout = "2.2.1" -coreKtx = "1.17.0" +coreKtx = "1.18.0" lifecycle = "2.10.0" multidex = "2.0.1" -navigation = "2.9.6" +navigation = "2.9.8" recyclerview = "1.4.0" # Jetpack Compose -compose = "1.10.1" -composeBom = "2026.01.00" +compose = "1.11.4" +composeBom = "2026.06.01" hiltNavigationCompose = "1.3.0" material = "1.13.0" # View-based Material material3 = "1.4.0" materialIconsExtended = "1.7.8" # Google Maps & Places -mapsCompose = "7.0.0" -mapsKtx = "6.0.0" -places = "5.1.1" +mapsCompose = "8.3.0" +mapsKtx = "6.0.1" +places = "5.3.0" playServicesMaps = "20.0.0" secretsGradlePlugin = "2.0.1" # Wear OS -wear = "1.3.0" +wear = "1.4.0" wearable = "2.9.0" # Dependency Injection @@ -53,11 +53,11 @@ hilt = "2.57.2" # Testing espresso = "3.7.0" junit = "4.13.2" -mockito = "6.2.2" +mockito = "6.3.0" robolectric = "4.16.1" truth = "1.4.5" turbine = "1.2.1" -uiautomator = "2.3.0" +uiautomator = "2.4.0" # Firebase firebaseBom = "34.8.0" @@ -82,6 +82,8 @@ cardview = { group = "androidx.cardview", name = "cardview", version.ref = "card constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" } +lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycle" } +lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" } multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" } navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigation" } navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigation" }