Symptom

Step 0 of openspec/changes/upgrade-agp-9-1-1 calls for a clean baseline on AGP 8.12.3 + Gradle 9.4.0 — every :androidApp:assembleDebug, :composeApp:desktopJar, :server:shadowJar, and the JUnit suites green, and the deprecation inventory captured before any AGP bump. Running ./gradlew --warning-mode=all :androidApp:assembleDebug surfaced one buildscript-side deprecation that originates in our code:

1
w: composeApp/build.gradle.kts:71:40: 'val preview: String' is deprecated. Specify dependency directly.

at implementation(compose.preview) inside the androidMain source set.

Two further deprecations in the same log are AGP-internal — they are emitted by AGP 8.12.3’s own configuration, not by anything we declare:

Both originate during Configure project :androidApp from inside the Android Gradle Plugin itself; they will clear when AGP moves off 8.12.3 in Step 1.

Root cause

The Compose Multiplatform plugin’s compose.preview accessor was a thin shim over androidx.compose.ui:ui-tooling-preview. JetBrains deprecated the accessor in CMP 1.10.x because it offers no value over depending on the AndroidX artifact directly, and the accessor is on track for removal once AGP 9 lands. Carrying the deprecation across the AGP minor bumps would mean either re-fixing it under churn at the 9.0 cliff or hitting an outright build failure if a co-versioned CMP plugin bump (Step 3, per the spec’s Decision 5) deletes the accessor.

The two AGP-attributed multi-string warnings are not actionable inside this repo: they live in AGP’s internal dependency declarations (com.android.tools.build:aapt2:…:linux, the classifier-bearing form that triggers Gradle 9’s deprecation). Each step of the AGP staging plan re-checks them as part of the warning-mode=all run; a post-bump version of AGP that switches to single-string notation will retire them.

Fix

composeApp/build.gradle.kts — replaced implementation(compose.preview) in kotlin.sourceSets.androidMain with implementation(libs.compose.ui.tooling.preview), the existing gradle/libs.versions.toml alias for androidx.compose.ui:ui-tooling-preview pinned to the same Compose version (compose = "1.10.6"). One-line edit; no version-catalog change.

Re-running ./gradlew --warning-mode=all :androidApp:assembleDebug confirms the compose.preview warning is gone; only the two AGP-internal multi-string warnings remain, which is the expected post-Step-0 baseline state for the staged AGP upgrade. The full test gate (:server:shadowJar :shared:jvmTest :server:jvmTest :composeApp:desktopTest :androidApp:testDebugUnitTest) stays green; :composeApp:desktopTest is SKIPPED by the existing onlyIf { screenshotMode != null } gate, which is the project-wide convention for Roborazzi screenshot tests.

The Step-0 wrapper / toolchain checks (tasks.md 1.6, 1.7) are no-ops: gradle/wrapper/gradle-wrapper.properties is on gradle-9.4.0 (well above the AGP-9 floor of 8.13) and androidApp/build.gradle.kts already pins JavaLanguageVersion.of(21) and JavaVersion.VERSION_21 for compileOptions.

Prevention

Two rules carried into the AGP staging plan:

  1. Drive the upgrade with --warning-mode=all. tasks.md calls for it at every step (2.4, 2.6, 3.4, 3.7, 4.7, 4.8, 5.3); this PR establishes the pattern at Step 0 and pins the baseline so any new deprecation introduced by 8.13.x is unambiguous.
  2. Distinguish “our deprecation” from “AGP-internal deprecation” in the inventory. Anything under Configure project :… whose source path is gradle/libs.versions.toml or one of our build.gradle.kts files is fixable now; anything attributed to an AGP-internal artifact classifier (aapt2, lint-gradle) is fixed by the next AGP bump and should not block Step 0. The Step-0 PR fixes only the former category — bundling AGP-internal warnings into a non-AGP-bump PR is meaningless work.