kotlin-tooling-agp9-migration
Installation
SKILL.md
KMP AGP 9.0 Migration
Android Gradle Plugin 9.0 makes the Android application and library plugins incompatible with the Kotlin Multiplatform plugin in the same module. This skill guides you through the migration.
Step 0: Analyze the Project
Before making any changes, understand the project structure:
- Read
settings.gradle.kts(or.gradle) to find all modules - For each module, read its
build.gradle.ktsto identify which plugins are applied - Check if the project uses a Gradle version catalog (
gradle/libs.versions.toml). If it exists, read it for current AGP/Gradle/Kotlin versions. If not, find versions directly inbuild.gradle.ktsfiles (typically in the rootbuildscript {}orplugins {}block). Adapt all examples in this guide accordingly — version catalog examples usealias(libs.plugins.xxx)while direct usage usesid("plugin.id") version "x.y.z" - Read
gradle/wrapper/gradle-wrapper.propertiesfor the Gradle version - Check
gradle.propertiesfor any existing workarounds (android.enableLegacyVariantApi) - Check for
org.jetbrains.kotlin.androidplugin usage — AGP 9.0 has built-in Kotlin and this plugin must be removed
Related skills
More from kotlin/kotlin-agent-skills
kotlin-tooling-java-to-kotlin
>
268kotlin-backend-jpa-entity-mapping
>
256kotlin-tooling-cocoapods-spm-migration
Migrate KMP projects from CocoaPods (kotlin("native.cocoapods")) to Swift Package Manager (swiftPMDependencies DSL) — replaces pod() with swiftPackage(), transforms cocoapods.* imports to swiftPMImport.*, and reconfigures the Xcode project.
255