All skills
kotlin avatar

/kotlin-tooling-agp9-migration

@43f4771 official
by kotlinkotlin/kotlin-agent-skills1.1k stars
42

Migrates Kotlin Multiplatform (KMP) projects to Android Gradle Plugin 9.0+. Handles plugin replacement (com.android.kotlin.multiplatform.library), module splitting, DSL migration, and the new default project structure. Use when upgrading AGP, when build fails due to KMP+AGP incompatibility, or when the user mentions AGP 9.0, android multiplatform plugin, KMP migration, or com.android.kotlin.multiplatform.library.

Use this Skill: https://skilld.dev/gh/kotlin/kotlin-agent-skills/kotlin-tooling-agp9-migration

This session only. Nothing lands on disk.

referencesPLUGIN-COMPATIBILITY.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Plugin Compatibility: AGP 9.0

AGP 9.0 introduces breaking changes that affect many third-party plugins. Before migrating, check which plugins the project uses and whether they are compatible.


Known Compatible Plugins (minimum version required)

Plugin Minimum Compatible Version Notes
com.google.devtools.ksp 2.3.1 (2.3.3+ recommended) 2.3.1 adds AGP 9.0 support; 2.3.3+ fixes deprecated compilerOptions KGP API usage. May need android.disallowKotlinSourceSets=false
com.google.dagger.hilt.android 2.59 —
com.google.firebase.firebase-perf 2.0.2 —
androidx.navigation.safeargs 2.9.5 —
org.jetbrains.compose 1.9.3 —
org.jetbrains.dokka 2.2.0-Beta —
app.cash.burst 2.10.0 —
com.google.firebase.testlab 0.0.1-alpha11 —

Plugins Requiring Opt-Out Flags

These work but require temporarily setting android.newDsl=false (or other flags):

Plugin Workaround
androidx.baselineprofile (< 1.5.0-alpha01) android.newDsl=false
de.mannodermaus.android-junit5 (< 1.13.4.0) android.newDsl=false
com.google.android.gms:oss-licenses-plugin (< 0.10.8) android.newDsl=false
com.apollographql.apollo (< 4.4.0) android.newDsl=false
org.gradle.android.cache-fix (< 3.0.2) android.newDsl=false
com.github.triplet.play (< 4.0.0) android.newDsl=false
app.cash.sqldelight android.newDsl=false + android.disallowKotlinSourceSets=false
com.google.protobuf android.newDsl=false
app.cash.paparazzi android.newDsl=false
io.gitlab.arturbosch.detekt (< 2.0.0) android.newDsl=false + android.builtInKotlin=false
org.jlleitschuh.gradle.ktlint android.builtInKotlin=false
dev.icerock.mobile.multiplatform-resources (< 0.26.0) android.builtInKotlin=false + android.newDsl=false + android.sourceset.disallowProvider=false

Known Broken Plugins (No Workaround)

Plugin Status
com.newrelic.agent.android Incompatible with AGP 9.0
com.huawei.agconnect.agcp Incompatible with AGP 9.0

What To Do

  1. Inventory all plugins used in the project
  2. Check each against the tables above
  3. If any plugin is broken without workaround, inform the user — they may need to wait for a plugin update or remove it
  4. If plugins need opt-out flags, add them to gradle.properties and note them as temporary workarounds
  5. Update plugin versions to their AGP 9.0-compatible versions before or during migration

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides documentation and tools to assist in migrating Kotlin Multiplatform projects to Android Gradle Plugin (AGP) 9.0+. It includes guides for library modules, application splits, and a project analysis script. No security risks were identified.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    5/10 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 43f4771. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 6 months ago
metadata
{
  "author": "JetBrains",
  "version": "1.0.0"
}
  • kotlin
  • kmp
  • agp
  • android-gradle-plugin
  • migrations
  • multiplatform
  • gradle
  • android

README badge

README badge for kotlin/kotlin-agent-skills/kotlin-tooling-agp9-migration

Migrates Kotlin Multiplatform projects to Android Gradle Plugin 9.0+, which requires separating the Android application plugin from KMP. Handles plugin replacement, DSL migration, module splitting, and directory structure updates for both library and application modules.

Generated from the current SKILL.md.

Does this skill handle all KMP+AGP migration scenarios?
The skill covers three main paths: library modules (Path A), mandatory app+shared splits for AGP 9.0 (Path B), and recommended full restructures from monolithic modules (Path C). It assumes Kotlin Multiplatform projects; pure Android projects need only AGP version updates.
Do I need to remove the kotlin-android plugin?
Yes. AGP 9.0 has built-in Kotlin support, so org.jetbrains.kotlin.android must be removed from any module using AGP 9.0 plugins.
What happens to KAPT dependencies?
The skill identifies KAPT usage as incompatible with AGP 9.0. You must migrate to KSP or use com.android.legacy-kapt; the skill guides detection but does not automate the migration.
Do I need to rename my source directories?
Only if your module uses classic Android layout (src/main, src/test, src/androidTest). If it already uses KMP layout (src/androidMain, etc.), no directory renames are needed.
What Gradle and AGP versions does this target?
Gradle 9.1.0+ and AGP 9.0.0+. The skill includes gradle-wrapper updates and version catalog examples for both.

Generated from the current SKILL.md. These answers refresh after source changes.