From 91fbf4af639147bdbf073f631866c38fdc75de32 Mon Sep 17 00:00:00 2001 From: Max Mitchell Date: Fri, 13 Nov 2026 09:02:29 -0800 Subject: [PATCH] Internal change. PiperOrigin-RevId: 1021079370 --- .github/workflows/verify.yml | 29 ++++++++ app/build.gradle.kts | 6 +- .../java/com/example/cahier/CahierAppTest.kt | 2 +- .../example/cahier/CahierListDetailTest.kt | 2 +- .../cahier/core/utils/PointerInputUtilTest.kt | 2 +- .../java/com/example/cahier/ScreenshotTest.kt | 2 +- build.gradle.kts | 4 +- gradle/libs.versions.toml | 67 ++++++++++--------- gradle/wrapper/gradle-wrapper.properties | 2 +- ink-proto/build.gradle.kts | 4 +- 10 files changed, 77 insertions(+), 43 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 8fda066f..2970c970 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -55,6 +55,35 @@ jobs: arch: x86_64 script: ./gradlew :app:connectedAndroidTest + - name: Report failed Android tests + # connectedAndroidTest only points at an HTML report that stays on the runner, so this + # annotates each failed test with its failure message. + if: failure() + shell: python3 {0} + run: | + import glob + import xml.etree.ElementTree as ET + + def escape(text, is_property=False): + """Escapes text for a workflow command, e.g. ::error title=::.""" + text = text.replace("%", "%25").replace("\r", "%0D").replace("\n", "%0A") + if is_property: + text = text.replace(":", "%3A").replace(",", "%2C") + return text + + for path in glob.glob("app/build/outputs/androidTest-results/connected/**/*.xml", recursive=True): + try: + cases = list(ET.parse(path).getroot().iter("testcase")) + except ET.ParseError: + continue + for case in cases: + for problem in case.findall("failure") + case.findall("error"): + test = f"{case.get('classname')}.{case.get('name')}" + details = (problem.text or problem.get("message") or "").strip() + print(f"{test} failed:\n{details}\n") + summary = "\n".join(details.splitlines()[:40]) + print(f"::error title={escape(test, is_property=True)}::{escape(summary)}") + screenshots: runs-on: ubuntu-latest permissions: diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f506b194..a9a02655 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,7 +17,7 @@ plugins { alias(libs.plugins.androidApplication) alias(libs.plugins.ksp) alias(libs.plugins.roborazzi) - id("org.jetbrains.kotlin.plugin.compose") version "2.3.20" + id("org.jetbrains.kotlin.plugin.compose") version "2.4.21" id("kotlin-parcelize") kotlin("plugin.serialization") id("com.google.dagger.hilt.android") @@ -157,6 +157,10 @@ dependencies { //Kotlin serialization implementation(libs.kotlinx.serialization.json) + // Instrumented tests run against the app APK's kotlinx-coroutines, so keep it at the version + // kotlinx-coroutines-test needs. + implementation(platform(libs.kotlinx.coroutines.bom)) + implementation(libs.appcompat.v7) implementation(libs.appcompat.v7.resources) diff --git a/app/src/androidTest/java/com/example/cahier/CahierAppTest.kt b/app/src/androidTest/java/com/example/cahier/CahierAppTest.kt index 6c94da6c..6a30b967 100644 --- a/app/src/androidTest/java/com/example/cahier/CahierAppTest.kt +++ b/app/src/androidTest/java/com/example/cahier/CahierAppTest.kt @@ -18,7 +18,7 @@ package com.example.cahier import androidx.compose.ui.test.hasSetTextAction import androidx.compose.ui.test.hasText -import androidx.compose.ui.test.junit4.createAndroidComposeRule +import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule import androidx.compose.ui.test.onAllNodesWithContentDescription import androidx.compose.ui.test.onNodeWithContentDescription import androidx.compose.ui.test.onNodeWithText diff --git a/app/src/androidTest/java/com/example/cahier/CahierListDetailTest.kt b/app/src/androidTest/java/com/example/cahier/CahierListDetailTest.kt index 8a1cc7ff..e5489680 100644 --- a/app/src/androidTest/java/com/example/cahier/CahierListDetailTest.kt +++ b/app/src/androidTest/java/com/example/cahier/CahierListDetailTest.kt @@ -19,7 +19,7 @@ package com.example.cahier import androidx.compose.runtime.Composable import androidx.compose.ui.test.DeviceConfigurationOverride import androidx.compose.ui.test.ForcedSize -import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.junit4.v2.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp diff --git a/app/src/androidTest/java/com/example/cahier/core/utils/PointerInputUtilTest.kt b/app/src/androidTest/java/com/example/cahier/core/utils/PointerInputUtilTest.kt index fe5b5315..0c3252bc 100644 --- a/app/src/androidTest/java/com/example/cahier/core/utils/PointerInputUtilTest.kt +++ b/app/src/androidTest/java/com/example/cahier/core/utils/PointerInputUtilTest.kt @@ -22,7 +22,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.ui.Modifier import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.platform.testTag -import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.junit4.v2.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.performClick import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/app/src/test/java/com/example/cahier/ScreenshotTest.kt b/app/src/test/java/com/example/cahier/ScreenshotTest.kt index 08892d80..25583a13 100644 --- a/app/src/test/java/com/example/cahier/ScreenshotTest.kt +++ b/app/src/test/java/com/example/cahier/ScreenshotTest.kt @@ -1,7 +1,7 @@ package com.example.cahier import androidx.compose.runtime.Composable -import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.junit4.v2.createComposeRule import androidx.compose.ui.test.onRoot import com.example.cahier.core.data.FakeNotesRepository import com.example.cahier.features.home.HomePane diff --git a/build.gradle.kts b/build.gradle.kts index 9fe3c5ff..eccd70cf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,6 +8,6 @@ plugins { alias(libs.plugins.androidApplication) apply false alias(libs.plugins.androidLibrary) apply false alias(libs.plugins.ksp) apply false - kotlin("plugin.serialization") version "2.3.20" - id("com.google.dagger.hilt.android") version "2.59.2" apply false + kotlin("plugin.serialization") version "2.4.21" + id("com.google.dagger.hilt.android") version "2.60.1" apply false } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 06282866..05145d9d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,52 +1,52 @@ [versions] -agp = "9.1.0" -appcompatV7 = "1.7.1" -coilCompose = "3.4.0" -foundation = "1.10.5" -hiltAndroid = "2.59.2" -hiltNavigationCompose = "1.3.0" +agp = "9.5.1" +appcompatV7 = "1.8.0" +coilCompose = "3.6.3" +foundation = "1.12.1" +hiltAndroid = "2.60.1" +hiltNavigationCompose = "1.4.0" ink = "1.1.0-alpha11" -kotlin = "2.3.20" -coreKtx = "1.18.0" +kotlin = "2.4.21" +coreKtx = "1.19.1" junit = "4.13.2" junitVersion = "1.3.0" espressoCore = "3.7.0" -kotlinxSerializationJson = "1.10.0" -lifecycleRuntimeKtx = "2.10.0" +kotlinxSerializationJson = "1.13.0" +kotlinxCoroutines = "1.11.0" +lifecycleRuntimeKtx = "2.11.0" activityCompose = "1.13.0" -composeBom = "2026.03.00" -lifecycleViewmodelCompose = "2.10.0" -lifecycleRuntimeCompose = "2.10.0" -adaptiveNavigationAndroid = "1.2.0" -navigationRuntimeKtx = "2.9.7" -navigationCompose = "2.9.7" -protobufJavalite = "4.34.0" +composeBom = "2026.09.00" +lifecycleViewmodelCompose = "2.11.0" +lifecycleRuntimeCompose = "2.11.0" +adaptiveNavigationAndroid = "1.3.0" +navigationRuntimeKtx = "2.10.2" +navigationCompose = "2.10.2" +protobufJavalite = "4.36.2" composeColorPickerAndroid = "0.7.0" -roomKtx = "2.8.4" -roomRuntime = "2.8.4" +roomKtx = "2.8.5" +roomRuntime = "2.8.5" windowCore = "1.5.1" -ksp = "2.3.6" -roomCompiler = "2.8.4" +ksp = "2.3.13" +roomCompiler = "2.8.5" material3AdaptiveNavigationSuiteAndroidVersion = "1.4.0" inputMotionprediction = "1.0.1" -protobufPlugin = "0.9.4" +protobufPlugin = "0.10.1" # AI Brush Designer CLI -picocli = "4.7.5" -jline = "3.25.1" -genai = "1.66.0" -errorprone = "2.50.0" +picocli = "4.7.7" +jline = "3.30.17" +genai = "1.80.0" +errorprone = "2.52.0" # Tests -mockito = "5.23.0" -mockitoKotlin = "6.2.3" +mockito = "5.24.0" +mockitoKotlin = "6.4.0" coreTesting = "2.2.0" -kotlinxCoroutinesTest = "1.10.2" turbine = "1.2.1" material3WindowSizeClass = "1.4.0" -robolectric = "4.16.1" -roborazzi = "1.59.0" +robolectric = "4.17" +roborazzi = "1.79.0" truth = "1.4.5" testParameterInjector = "1.25" @@ -93,6 +93,7 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio androidx-window-core = { group = "androidx.window", name = "window-core", version.ref = "windowCore" } androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomCompiler" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } +kotlinx-coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bom", version.ref = "kotlinxCoroutines" } material3-adaptive-navigation-suite-android = { group = "androidx.compose.material3", name = "material3-adaptive-navigation-suite-android", version.ref = "material3AdaptiveNavigationSuiteAndroidVersion" } androidx-ink-authoring-android = { group = "androidx.ink", name = "ink-authoring-android", version.ref = "ink" } androidx-input-motionprediction = { group = "androidx.input", name = "input-motionprediction", version.ref = "inputMotionprediction" } @@ -101,7 +102,7 @@ androidx-ink-brush-compose = { group = "androidx.ink", name = "ink-brush-compose androidx-ink-geometry-compose = { group = "androidx.ink", name = "ink-geometry-compose", version.ref = "ink" } # AI Brush Designer CLI -kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesTest" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } picocli = { module = "info.picocli:picocli", version.ref = "picocli" } jline = { module = "org.jline:jline", version.ref = "jline" } google-genai = { module = "com.google.genai:google-genai", version.ref = "genai" } @@ -111,7 +112,7 @@ errorprone-annotations = { module = "com.google.errorprone:error_prone_annotatio mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" } androidx-arch-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" } -kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" } hilt-android-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hiltAndroid" } turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } mockito-android = { module = "org.mockito:mockito-android", version.ref = "mockito" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c61a118f..60d3852c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/ink-proto/build.gradle.kts b/ink-proto/build.gradle.kts index bcec5766..86fb2f7f 100644 --- a/ink-proto/build.gradle.kts +++ b/ink-proto/build.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { id("java-library") kotlin("jvm") - id("com.google.protobuf") version "0.9.6" + id("com.google.protobuf") version "0.10.1" } java { @@ -25,7 +25,7 @@ dependencies { protobuf { protoc { - artifact = "com.google.protobuf:protoc:4.34.0" + artifact = "com.google.protobuf:protoc:4.36.2" } generateProtoTasks {