Skip to content

Migrate to AGP 9.3.0#23

Merged
anod merged 2 commits into
mainfrom
agp-9-migration
Jul 23, 2026
Merged

Migrate to AGP 9.3.0#23
anod merged 2 commits into
mainfrom
agp-9-migration

Conversation

@anod

@anod anod commented Jul 22, 2026

Copy link
Copy Markdown
Owner

AGP 9.3.0 migration

Migrates the app from AGP 8.13 to 9.3.0, adopts AGP 9 full defaults, and pulls in the dependency-catalog upgrades.

Changes

  • AGP 8.13 → 9.3.0, Gradle wrapper → 9.5, Kotlin → 2.4.10, KSP → 2.3.10; catalog dependency bumps (Compose BOM, lifecycle 2.10 → 2.11, Coil, SQLDelight, navigation3, ben-manes 0.54, …).
  • AGP 9 defaults enabled — no Upgrade-Assistant opt-out flags remain in gradle.properties (built-in Kotlin, new DSL, non-final app R class, R8 strict full mode + optimized resource shrinking, unique package names, uses-sdk disallowed in manifest, target=compileSdk default, non-constrained deps, resValues off by default).
  • Built-in Kotlin — dropped the kotlin-android plugin (app + root + catalog); app uses kotlin { compilerOptions }.
  • compileSdk 36 → 37 across all modules (androidx.core 1.19.0 / lifecycle 2.11.0 require API 37; AGP 9 enforces it).
  • KMP DSLkotlin { androidLibrary {} }kotlin { android {} } (compose, content, skins, iconpack).
  • Submodule — bumped lib (android-framework-lib) to 4601f8be, which merges the AGP 9 migration (Migrate to AGP 9: compileSdk 37 and android {} KMP DSL android-framework-lib#2) and the drop of the legacy iosX64 KMP target (Drop legacy iosX64 (Intel simulator) KMP target android-framework-lib#3).
  • Baseline profile — regenerated app/src/release/generated/baselineProfiles on device after the upgrades (24888 → 20237 rules).

Validation

  • :app:installDebug — builds/installs on a physical device (CPH2653, Android 16); launches, no crash.
  • :app:installRelease — full R8 minify + resource shrink + lintVital + release signing; installs and launches on device with no crash (bundles the regenerated baseline profile).
  • :content:testAndroidHostTest — 8/8 Robolectric tests pass.

iosX64 (resolved)

androidx.lifecycle:lifecycle-viewmodel:2.11.0 no longer publishes an iosX64 artifact (2.10.0 did). Fixed upstream by dropping the iosX64 target from android-framework-lib (anod/android-framework-lib#3, merged); iosArm64 + iosSimulatorArm64 remain. The submodule bump above folds this fix in, so the KMP resolution error is gone. The Android build/tests were never affected.

Copilot AI review requested due to automatic review settings July 22, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the project’s Android/Gradle toolchain to AGP 9.3.0 and Gradle 9.5, updating the version catalog and aligning modules with AGP 9 defaults (including Kotlin “built-in” usage and the updated KMP Android DSL). This fits the codebase’s ongoing modular Gradle/Kotlin setup by keeping all module build scripts and the version catalog in sync with the new plugin/tooling requirements.

Changes:

  • Upgraded core build tooling (AGP/Gradle wrapper/Kotlin) and refreshed dependency versions via gradle/libs.versions.toml.
  • Updated KMP Android DSL in modules from androidLibrary {} to android {} and bumped compileSdk to 37 across affected modules.
  • Removed usage of the kotlin-android plugin alias where applicable (root + app), moving the app to kotlin { compilerOptions { ... } }.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
skins/build.gradle.kts Migrates KMP Android DSL (androidLibraryandroid) and bumps compileSdk to 37.
iconpack/build.gradle.kts Migrates KMP Android DSL (androidLibraryandroid) and bumps compileSdk to 37.
gradle/wrapper/gradle-wrapper.properties Updates Gradle wrapper distribution to 9.5.0.
gradle/libs.versions.toml Bumps AGP/Kotlin and multiple library versions; removes kotlin-android plugin alias entry.
content/build.gradle.kts Migrates KMP Android DSL and bumps compileSdk to 37.
compose/build.gradle.kts Migrates KMP Android DSL and bumps compileSdk to 37.
build.gradle.kts Updates ben-manes plugin and removes kotlin-android alias application.
baselineProfile/build.gradle.kts Bumps compileSdk to 37 for baseline profile module.
app/build.gradle.kts Drops kotlin-android plugin usage, configures Kotlin compiler options via kotlin { compilerOptions { ... } }, and bumps compileSdk to 37.

@anod
anod force-pushed the agp-9-migration branch from a6a11ca to 3d1c4f3 Compare July 22, 2026 10:33
Copilot AI review requested due to automatic review settings July 22, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.

Adopt AGP 9 with full defaults (no Upgrade-Assistant opt-out flags in
gradle.properties): built-in Kotlin, new DSL, non-final app R class, R8
strict full mode + optimized resource shrinking, unique package names,
uses-sdk disallowed in manifest, target=compileSdk default.

- Catalog: AGP 8.13 -> 9.3.0, Gradle wrapper -> 9.5, Kotlin 2.4.10, KSP
  2.3.10, plus dependency bumps (Compose BOM, lifecycle 2.10 -> 2.11, Coil,
  SQLDelight, navigation3, ben-manes 0.54, etc.).
- Built-in Kotlin: drop the kotlin-android plugin (app + root + catalog);
  app now uses kotlin { compilerOptions }.
- Bump compileSdk 36 -> 37 across all modules (required by androidx.core
  1.19.0 / lifecycle 2.11.0 AAR metadata; enforced by AGP 9).
- Rename deprecated kotlin { androidLibrary {} } -> kotlin { android {} }
  in KMP modules (compose, content, skins, iconpack).
- Bump lib submodule to the merged android-framework-lib commit (AGP 9
  migration + drop of the legacy iosX64 KMP target).

Validated: :app:installDebug + launch on device (Android 16);
:content:testAndroidHostTest 8/8 green.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5b608ee8-35b8-4744-b331-4844ee991f8a
@anod
anod force-pushed the agp-9-migration branch from 3d1c4f3 to 68eb63e Compare July 22, 2026 10:52
Copilot AI review requested due to automatic review settings July 22, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Comment thread gradle/libs.versions.toml
Regenerated app/src/release/generated/baselineProfiles from a
nonMinifiedRelease run on a connected device (CPH2653, Android 16)
following the AGP 9.3.0 migration and dependency bumps (lifecycle
2.11, Compose BOM, etc.). Rules now reflect the updated startup and
critical-path classes/methods (24888 -> 20237 lines).

Validated: :app:installRelease (R8 minify + resource shrink +
release signing) installs and launches on device with no crash.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5b608ee8-35b8-4744-b331-4844ee991f8a
Copilot AI review requested due to automatic review settings July 22, 2026 11:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 12 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 12 changed files in this pull request and generated no new comments.

@anod
anod merged commit a80bfe1 into main Jul 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants