Skip to content

Migrate Android library to AGP 9.0 with version catalog#136

Open
AYastrebov wants to merge 1 commit into
cfal:masterfrom
AYastrebov:chore/android-agp9
Open

Migrate Android library to AGP 9.0 with version catalog#136
AYastrebov wants to merge 1 commit into
cfal:masterfrom
AYastrebov:chore/android-agp9

Conversation

@AYastrebov

@AYastrebov AYastrebov commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Modernize the Android library build: upgrade to AGP 9.0 and add a Gradle version catalog so plugin versions are no longer hardcoded in build.gradle.kts.

Changes

What Before After
AGP 8.3.2 (hardcoded) 9.0.1 (via libs.versions.toml)
Kotlin plugin kotlin-android 1.9.22 Removed — AGP 9.0 built-in Kotlin
kotlinOptions jvmTarget = "17" Removed — inherited from compileOptions.targetCompatibility
compileSdk 34 35 (AGP 9.0 requirement)
CI Gradle 8.6 9.5.0
Plugin versions Hardcoded in build.gradle.kts gradle/libs.versions.toml catalog

Removed from gradle.properties

  • android.enableJetifier=false — Jetifier was removed in AGP 9.0
  • kotlin.code.style=official — no longer relevant with built-in Kotlin

Verification

  • assembleRelease builds successfully with Gradle 9.4 + AGP 9.0.1

Test plan

  • CI: Build Android AAR job passes
  • Consuming projects can override AGP/Kotlin versions via their own version catalog

🤖 Generated with Claude Code

- Upgrade AGP from 8.3.2 to 9.0.1
- Remove kotlin-android plugin (AGP 9.0 has built-in Kotlin support)
- Remove kotlinOptions block (jvmTarget inherited from compileOptions)
- Add gradle/libs.versions.toml version catalog to avoid hardcoded
  plugin versions in build.gradle.kts
- Bump compileSdk from 34 to 35 (required by AGP 9.0)
- Bump CI Gradle from 8.6 to 9.5.0 (AGP 9.0 requires Gradle 9.1+)
- Remove obsolete gradle.properties (enableJetifier, kotlin.code.style)

Verified: assembleRelease builds successfully with Gradle 9.4 + AGP 9.0.1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AYastrebov AYastrebov marked this pull request as ready for review May 5, 2026 12:33
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.

1 participant