kotlin-tooling-agp9-migration

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

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/Zeyad-37/tech-agency --skill kotlin-tooling-agp9-migration-zeyad-37
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kotlin-tooling-agp9-migration
Source: https://github.com/Zeyad-37/tech-agency/tree/main/.claude/skills/kotlin-tooling-agp9-migration
Command: npx skills add https://github.com/Zeyad-37/tech-agency --skill kotlin-tooling-agp9-migration-zeyad-37

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? AGP 9.0 makes the Android application and library plugins incompatible with the Kotlin Multiplatform plugin in the same module, breaking builds on upgrade. This Skill guides the full migration: plugin replacement, DSL changes, module splitting, and version updates. ## Core Features & Use Cases - Project Analysis and Module Classification: Inspects settings.gradle.kts, build files, and version catalogs to classify each module into migration paths (library swap, mandatory app split, or full restructure). - Guided Migration Paths: Provides step-by-step instructions for replacing com.android.library with com.android.kotlin.multiplatform.library, extracting androidApp/desktopApp/webApp modules, and updating Gradle, AGP, and JDK versions. - Built-in Kotlin and Compatibility Handling: Covers removal of kotlin-android and kapt plugins, kotlinOptions to compilerOptions migration, third-party plugin compatibility, and gradle.properties default changes. - Use Case: A team upgrades their KMP project to AGP 9.0 and the build fails. This Skill analyzes the project, splits the monolithic composeApp module into androidApp plus shared, migrates the DSL, and verifies the build. ## Quick Start Ask the assistant to migrate this Kotlin Multiplatform project to AGP 9.0 and fix the resulting build errors.

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.0+ with JDK 17+. Modules combining KMP with com.android.application must be split into a separate androidApp module.

Why does my KMP build fail after upgrading to AGP 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 split application modules and switch library modules to the new com.android.kotlin.multiplatform.library plugin.

Can I use kotlin-android plugin with AGP 9.0?▼

No. AGP 9.0 includes built-in Kotlin support for com.android.application and com.android.library modules, so org.jetbrains.kotlin.android must be removed. Applying both causes a conflict error.

Does the KMP library plugin support BuildConfig and build variants?▼

No. The com.android.kotlin.multiplatform.library plugin produces a single variant and does not generate BuildConfig. Use expect/actual with dependency injection, or plugins like BuildKonfig, for compile-time constants.

How do I replace kapt when migrating to AGP 9.0?▼

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

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

Android Studio Otter 3 (2025.2.3) or later has full AGP 9.0 support. IntelliJ IDEA does not support AGP 9.0, so Android Studio is required for KMP projects using the new plugin.