kotlin-tooling-agp9-migration

Migrates Kotlin Multiplatform projects to Android Gradle Plugin 9.0 with DSL and module restructuring.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/DCueto/zen-track --skill kotlin-tooling-agp9-migration-dcueto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kotlin-tooling-agp9-migration
Source: https://github.com/DCueto/zen-track/tree/main/ZenTrackApp/.agents/skills/kotlin-tooling-agp9-migration
Command: npx skills add https://github.com/DCueto/zen-track --skill kotlin-tooling-agp9-migration-dcueto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Android Gradle Plugin 9.0 makes the Android application and library plugins incompatible with the Kotlin Multiplatform plugin in the same module, breaking builds for KMP projects. This Skill guides the full migration: plugin replacement, DSL changes, module splitting, and version updates. ## Core Features & Use Cases - Library Plugin Swap: Replaces com.android.library with com.android.kotlin.multiplatform.library, migrates the android {} DSL into kotlin { android {} }, and renames source sets like androidHostTest and androidDeviceTest. - Mandatory App Split: Splits modules combining kotlin.multiplatform with com.android.application into a pure androidApp module and a shared KMP library module, as required by AGP 9.0. - Built-in Kotlin Migration: Removes the org.jetbrains.kotlin.android plugin, migrates kapt to KSP or com.android.legacy-kapt, and converts kotlinOptions to compilerOptions. - Use Case: A team upgrades their Compose Multiplatform project to AGP 9.0 and the build fails with plugin incompatibility errors. The Skill analyzes each module, classifies the migration path, rewrites build.gradle.kts files, and verifies the build. ## Quick Start Migrate my Kotlin Multiplatform project to AGP 9.0 and fix the build failures caused by the com.android.application and KMP plugin incompatibility.

Frequently Asked Questions about kotlin-tooling-agp9-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a Kotlin Multiplatform project to AGP 9.0?▼

Replace com.android.library with com.android.kotlin.multiplatform.library, move the android {} block into kotlin { android {} }, and update Gradle to 9.1+. Modules combining KMP with com.android.application must be split into a separate androidApp module and a shared library module.

Why does my KMP build fail after upgrading to Android Gradle Plugin 9.0?▼

AGP 9.0 makes com.android.application and com.android.library incompatible with the Kotlin Multiplatform plugin in the same module. You must swap library modules to com.android.kotlin.multiplatform.library and split application modules into a pure Android app module.

Does AGP 9.0 still need the org.jetbrains.kotlin.android plugin?▼

No, AGP 9.0 includes built-in Kotlin support for com.android.application and com.android.library modules, so the kotlin-android plugin must be removed. KMP library modules still require org.jetbrains.kotlin.multiplatform plus the new KMP library plugin.

Can I use kapt with AGP 9.0 built-in Kotlin?▼

The org.jetbrains.kotlin.kapt plugin is incompatible with AGP 9.0's built-in Kotlin. The preferred fix is migrating annotation processors to KSP, or as a fallback apply the com.android.legacy-kapt plugin versioned with AGP.

What are the limitations of the com.android.kotlin.multiplatform.library plugin?▼

The plugin produces a single build variant with no build types or product flavors, does not generate BuildConfig, and does not support NDK/JNI. Workarounds include BuildKonfig for compile-time constants and extracting native code into a classic com.android.library module.

Which IDE supports AGP 9.0 and the KMP library plugin?▼

Android Studio Otter 3 (2025.2.3) is the first IDE with full AGP 9.0 and KMP library plugin support. IntelliJ IDEA does not support AGP 9.0, so Android Studio is required for project sync and build integration.