
Kotlin Tooling Agp9 Migration
Verify a Kotlin Multiplatform project after migrating to Android Gradle Plugin 9.0 without leaving plugin or source-set misconfigurations.
Overview
Kotlin Tooling AGP 9 Migration is an agent skill for the Build phase that verifies KMP Gradle and plugin setup after migrating to AGP 9.0.
Install
npx skills add https://github.com/kotlin/kotlin-agent-skills --skill kotlin-tooling-agp9-migrationWhat is this skill?
- Post-migration verification checklist for KMP on AGP 9.0
- Plugin configuration: com.android.kotlin.multiplatform.library vs legacy Android plugins
- Built-in Kotlin migration—remove org.jetbrains.kotlin.android and kapt where applicable
- KMP library module source-set renames: androidMain, androidHostTest, androidDeviceTest
- androidLibrary {} inside kotlin {} instead of top-level android {} block
- Checklist covers Plugin Configuration and KMP Library Modules sections
- Requires com.android.kotlin.multiplatform.library for KMP library modules on AGP 9
Adoption & trust: 658 installs on skills.sh; 821 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your KMP repo upgraded to AGP 9 but builds fail or behave oddly because plugins, source sets, or kapt were not migrated consistently.
Who is it for?
Solo builders maintaining Kotlin Multiplatform Android targets who just bumped AGP to 9.0 and want an agent-guided audit of every module.
Skip if: Pure JVM backends, greenfield apps not using KMP, or teams that have not started an AGP 9 migration yet.
When should I use this skill?
After migrating a KMP project to AGP 9.0 and you need to verify plugins, source sets, and test configuration are correct.
What do I get? / Deliverables
You complete a structured checklist confirming plugins, source sets, tests, and dependency configurations match AGP 9 KMP expectations.
- Completed migration verification checklist with noted exceptions (e.g. android.builtInKotlin=false)
Recommended Skills
Journey fit
AGP and Gradle migration is active product construction tooling, not launch or grow work. Gradle plugins, version catalogs, and KMP Android library wiring are integration-layer changes that gate a working mobile build.
How it compares
A migration verification checklist skill—not a generic Gradle tutorial or a CI pipeline generator.
Common Questions / FAQ
Who is kotlin-tooling-agp9-migration for?
Mobile-focused solo developers and indie teams using Kotlin Multiplatform who need a second pass on Gradle files after AGP 9.0 upgrade.
When should I use kotlin-tooling-agp9-migration?
Right after you change AGP, Kotlin, or KSP versions in the catalog, or when androidMain and androidLibrary blocks were edited during a migration PR.
Is kotlin-tooling-agp9-migration safe to install?
Check the Security Audits panel on this Prism page for risk level and audit results before installing into your agent environment.
SKILL.md
READMESKILL.md - Kotlin Tooling Agp9 Migration
# KMP AGP 9.0 Migration Verification Checklist Use this checklist after migration to verify everything is configured correctly. ## Plugin Configuration - [ ] `com.android.kotlin.multiplatform.library` plugin declared for KMP library modules - [ ] No `com.android.library` or `com.android.application` in KMP modules' build.gradle.kts - [ ] `org.jetbrains.kotlin.android` removed from all build files and version catalog (built-in Kotlin replaces it) - [ ] No `org.jetbrains.kotlin.kapt` plugin — migrated to KSP or `com.android.legacy-kapt` - [ ] `android.kotlinOptions {}` migrated to `kotlin { compilerOptions {} }` (non-KMP modules) - [ ] `kotlin.sourceSets` migrated to `android.sourceSets` with `.kotlin` accessor (non-KMP modules) - [ ] No `android.builtInKotlin=false` unless required by incompatible plugin (documented as temporary) - [ ] Third-party plugins verified compatible ## KMP Library Modules - [ ] Source sets renamed: `androidMain`, `androidHostTest`, `androidDeviceTest` - [ ] No `android {}` top-level block — use `androidLibrary {}` inside `kotlin {}` instead - [ ] `androidResources { enable = true }` present if module uses Android or Compose Multiplatform resources - [ ] `withJava()` present if module has .java source files - [ ] Tests configured: `withHostTest {}`, `withDeviceTest {}` - [ ] No `debugImplementation` or analogs in library modules - use `androidRuntimeClasspath` for tooling deps - app modules can still use `debugImplementation` - [ ] Unique `namespace` for each library module (different from app module; `android.uniquePackageNames=true` is default in AGP 9.0) ## Gradle Properties & DSL - [ ] No removed properties in `gradle.properties` that cause errors: - `android.enableLegacyVariantApi` - `android.r8.integratedResourceShrinking` - `android.enableNewResourceShrinker.preciseShrinking` - [ ] Any opt-out flags (`android.newDsl=false`, `android.builtInKotlin=false`) documented with reason - [ ] `targetSdk` explicitly set in all app modules (defaults to `compileSdk` now, was `minSdk`) ## Build Logic / Convention Plugins - [ ] No references to `BaseExtension`, `AppExtension`, `LibraryExtension` (removed in AGP 9.0) - [ ] Using `CommonExtension` or specific new DSL types - [ ] No use of removed APIs: `applicationVariants`, `libraryVariants`, `variantFilter` ## ProGuard / R8 - [ ] Consumer ProGuard rules migrated to `consumerProguardFiles.add(file(...))` in new DSL - [ ] Using `proguard-android-optimize.txt` (not `proguard-android.txt`) - [ ] No global options (`-dontobfuscate`, `-dontoptimize`) in library consumer rules - [ ] Keep rules updated for R8 strict full mode (explicit default constructor rules if needed) ## Build & Test Verification - [ ] `./gradlew build` succeeds - [ ] `./gradlew :androidApp:assembleDebug` succeeds (if app module exists) - [ ] `xcodebuild -project iosApp/*.xcodeproj -scheme <scheme> -sdk iphonesimulator build` succeeds (if iOS app exists) - [ ] Desktop app compiles: `./gradlew :desktopApp:run` or equivalent (if desktop target exists) - [ ] Web/Wasm target compiles: `./gradlew :wasmJsApp:wasmJsBrowserDistribution` or equivalent (if web target exists) - [ ] `./gradlew :shared:allTests` succeeds (or equivalent for KMP test tasks) - [ ] `./gradlew :androidApp:testDebugUnitTest` succeeds (if app module exists) - [ ] No deprecation warnings about variant API or DSL # DSL Reference: AGP 8.x to AGP 9.x KMP Library Migration Side-by-side mapping of every DSL element from the old `com.android.library` configuration to the new `com.android.kotlin.multiplatform.library` configuration. --- ## Plugin IDs | Old (AGP 8.x) | New (AGP 9.x) | |--------------------------------------|-----------------------------------------------------------------------------------------------------| | `com.android.library` | `com.android.kotlin.multiplatform.library`