Skip to content

Chore: Platform upgrade to Compose BOM 2026.09.00, Kotlin 2.4, AGP 9, compileSdk 37 #236

Open

Description

@dipenpradhan

TL;DR

Bring the toolchain to the Compose 1.12 baseline in one coordinated change: BOM 2026.09.00, Kotlin 2.4.20, AGP 9.x (at least 9.1.0), Gradle 9.x, compileSdk 37 / targetSdk 36, landing the six open Dependabot PRs plus follow-on bumps. This is the foundation for every other roadmap issue: the APIs they demonstrate do not exist in Compose 1.7.6.

Background

Compose 1.12 shipped with BOM 2026.09.00 (August 2026): MeshGradientPainter, keyed SideEffect, DeferredAnimatedContent, Credential Manager integration, grid named areas, LayerOutsets, wide color gamut / HDR. Material 3 1.4.0 adds the state-based TextField and SecureTextField. The BOM raises minimum requirements to AGP 9.1.0 and compileSdk 37.

The Dependabot PRs have sat open since September 2026; the dependency ones cannot merge individually: Compose 1.12 requires AGP >= 9.1.0 and compileSdk 37; AGP 9 requires Gradle 9 and removes deprecated DSL; Kotlin 2.4 needs the matching Compose Compiler Gradle plugin and a current KSP2 release (KSP is now versioned independently of Kotlin; the newest is 2.3.x).

Current state (verified 2026-11-01):

Target catalog values: agp latest stable 9.x (the Compose UI 1.12.1 artifact declares minAndroidGradlePluginVersion=9.1.0 and minCompileSdk=37), kotlin 2.4.20 or newer 2.4.x (Compose Compiler plugin follows kotlin), ksp latest 2.3.x, compose-bom 2026.09.00, navigation-compose 2.10.1, kotlinx-serialization-json 1.11.0, logging-interceptor 5.5.0, latest stable for activity-compose, lifecycle, paging, coil, media3, room; robolectric to an SDK 37-capable release; roborazzi to latest; Gradle wrapper 9.x; targetSdk 36; compileSdk 37. The adaptive artifacts are BOM-managed and move to 1.3.0 automatically.

Expected outcome

Diagram

flowchart LR
  A["Toolchain: AGP 9.x (at least 9.1.0), Gradle 9.x, Kotlin 2.4.20 + KSP + Compose Compiler"] --> B["BOM 2026.09.00 (Compose 1.12, M3 1.4.0)"]
  B --> C["SDKs: compileSdk 37, targetSdk 36 (ProjectConfigs.kt)"]
  C --> D["Follow-on bumps: navigation-compose, serialization, okhttp, lifecycle, paging, coil, media3, room, Robolectric, Roborazzi"]
  D --> E["Compile fixes, baselines, README, CI green"]
  E --> F["Unblocks #237 through #244"]
Loading

Tasks

PR 1: Toolchain only (AGP / Gradle / Kotlin / KSP)

  • Bump agp, kotlin, ksp in gradle/libs.versions.toml and the Compose Compiler plugin version wherever applied (root build.gradle.kts, buildSrc/).
    • Done when: ./gradlew build is green while the old BOM is still in place.
  • Update gradle/wrapper/gradle-wrapper.properties to a 9.x distribution.
  • Fix AGP 9 DSL removals in the root and buildSrc build scripts.

PR 2: BOM and SDKs

PR 3: Housekeeping and smoke test

  • Update the README badge to BOM 2026.09.00 and rewrite "How to get started" (current Android Studio stable, JDK 17+).
  • Update the JDK pin in .github/workflows/android.yml (and build.yml, master-apk-create.yml, wrapper-validation.yml) only if AGP 9 requires a newer JDK.
  • Drop the google-material catalog entry if the only MDC consumers remain DialogsActivity (View-based pickers, app/.../ui/home/dialogs/DialogsActivity.kt:44) and betty's Snackbar (demos/betty/app/src/main/java/com/adwi/betty/util/Extensions.kt:13).
  • Smoke-test every Home entry, all Widgets sections, Animations (canvas + lottie), every template, and every Demo UI app (see app/.../ui/demoapps/DemoUIList.kt) on an API 36 emulator, light and dark.
    • Done when: no crash or blank screen; regressions filed as follow-up issues.

Out of scope

  • M2-to-M3 import migration -- covered under "Enhancement: Complete the Material 2 to Material 3 migration".
  • Material 3 Expressive demos -- covered under "Feature: Material 3 Expressive showcase".
  • R8/minify, multidex removal, LiveData to StateFlow -- covered under "Enhancement: State and performance modernization".

Acceptance criteria

Verification steps

  1. Build: ./gradlew build -- expect BUILD SUCCESSFUL.

  2. ./gradlew :app:assembleDebug -- expect the debug APK.

  3. Confirm catalog versions:

    grep -E "^agp = |^kotlin = |^ksp = |^compose-bom = " gradle/libs.versions.toml
    

    Expect agp 9.x (at least 9.1.0; 9.5.0 is the newest stable today), kotlin 2.4.x, ksp 2.3.x, compose-bom 2026.09.00.

  4. cat gradle/wrapper/gradle-wrapper.properties -- distributionUrl shows a 9.x distribution.

  5. ./gradlew ktfmtCheck and ./gradlew testDebugUnitTest -- green.

  6. ./gradlew :components:tags:verifyRoborazziDebug -- green against re-recorded baselines.

  7. Manual smoke test on an API 36 emulator (./gradlew :app:installDebug), light then dark mode: open every Home entry, scroll every Widgets section, open both Animations tabs, open each template from the Templates screen, and launch every app in the Demo UI list. Expect no crashes or blank screens; file follow-up issues for any regression found.

Getting started

  • Read first: gradle/libs.versions.toml, build.gradle.kts, app/build.gradle.kts, gradle/wrapper/gradle-wrapper.properties, buildSrc/src/main/kotlin/com/guru/composecookbook/build/configurations/ProjectConfigs.kt, .github/workflows/android.yml.
  • Conventions: ./gradlew build is the only CI job today; ktfmt (googleStyle, maxWidth 100) is applied to all projects -- run ./gradlew ktfmtCheck before pushing; all Compose versions flow from the compose-bom bundle in the version catalog.
  • Suggested first PR: toolchain only (AGP 9.x / Gradle 9.x / Kotlin 2.4.20 / KSP / Compose Compiler) with the old BOM kept, building green before the BOM jump -- the two riskiest variable sets stay separable in review.
  • Pitfalls: BOM-managed artifacts (adaptive, material-icons) move with the BOM -- do not pin them explicitly; Robolectric must know SDK 37 or unit tests fail; the SDK package is named platforms;android-37.0 in sdkmanager; Roborazzi baselines need re-recording (:components:tags:recordRoborazziDebug) and committing; KSP no longer has Kotlin-prefixed versions, so do not look for 2.4.20-1.0.x; AGP 9 ships built-in Kotlin support, so check the kotlin-android plugin is not applied twice.

Dependencies

Roadmap overview (all ten issues; arrows mean "must land first"):

flowchart LR
  P1["Platform upgrade: BOM 2026.09.00, Kotlin 2.4, AGP 9"]
  P3["Material 2 to Material 3 migration"]
  P10["Testing and CI quality gate"]
  subgraph Features["Feature demos, need Compose 1.12"]
    P2["Material 3 Expressive showcase"]
    P4["Navigation 3 demo"]
    P5["Modern text input and forms"]
    P6["Advanced graphics and motion"]
    P7["Drag and drop and gestures"]
  end
  subgraph Quality["Cross-cutting passes"]
    P8["Edge-to-edge and accessibility"]
    P9["State and performance modernization"]
  end
  P1 --> P2
  P1 --> P4
  P1 --> P5
  P1 --> P6
  P1 --> P7
  P1 --> P8
  P1 --> P9
  P3 -.-> P2
  P10 -.-> P3
Loading

Solid arrows are hard blockers. Dotted arrows are "works best after". #238 and #245 can start immediately in parallel with this issue.

Unblocks #237 (Material 3 Expressive showcase), #239, #240, #241, #242, #243, #244 (state and performance modernization). Parallel with #238 (M2 to M3 migration) and #245 (testing and CI gate).

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions