kotlin-tooling-agp9-migration

Migrate Kotlin Multiplatform projects to Android Gradle Plugin 9.0+.

174|8|Updated Jan 9, 2024
One-click install
npx skills add https://github.com/klxiaoniu/QQVersionList --skill kotlin-tooling-agp9-migration-klxiaoniu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-tooling-agp9-migration
Source: https://github.com/klxiaoniu/QQVersionList/tree/main/.agents/skills/kotlin-tooling-agp9-migration
Command: npx skills add https://github.com/klxiaoniu/QQVersionList --skill kotlin-tooling-agp9-migration-klxiaoniu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

It resolves build failures and incompatibilities that occur when upgrading Kotlin Multiplatform (KMP) projects to Android Gradle Plugin (AGP) 9.0+, especially when Kotlin Android plugins and legacy KMP/Android configurations are still used in the same module.

Core Features & Use Cases

  • Project analysis and module classification: Reads Gradle settings, detects applied plugins per module, determines whether the project needs a library swap, an app split, or a full restructure, and recommends the minimal safe migration path.
  • AGP 9.0 KMP migration guidance: Provides concrete steps to replace com.android.library with com.android.kotlin.multiplatform.library, remove incompatible org.jetbrains.kotlin.android, migrate Android DSL into kotlin { android {} }, and handle KMP library limitations (single-variant model, resources enablement, dependency placement).
  • Optional structured assistance: Suggests running the included project analysis script (when available) and using reference docs for DSL mapping, known issues, and plugin compatibility.

Use case examples: upgrading an existing KMP shared module that currently uses com.android.library, fixing sync/build errors mentioning com.android.kotlin.multiplatform.library, or migrating when the project explicitly mentions AGP 9.0 / KMP migration blockers.

Quick Start

Tell the skill: migrate my KMP project to AGP 9.0+, and ask whether you should apply Path B (mandatory android app split) or Path C (full restructure), then provide the exact plugin and DSL changes to make for each module.

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 Android Gradle Plugin 9.0?

Migrating KMP to AGP 9.0 requires resolving plugin incompatibilities by replacing `com.android.library` with `com.android.kotlin.multiplatform.library` and restructuring your Android DSL into `kotlin { android { ... } }` blocks to meet new build requirements.

Why does my KMP build fail after upgrading to AGP 9.0?

KMP builds fail on AGP 9.0 due to incompatibilities between legacy Kotlin Android plugins and the new Android Gradle Plugin, requiring you to remove `org.jetbrains.kotlin.android` and migrate configurations into the `kotlin { android {} }` DSL.

What is `com.android.kotlin.multiplatform.library` used for in KMP migration?

`com.android.kotlin.multiplatform.library` is the AGP 9.0 plugin replacement for `com.android.library` in KMP projects, designed to resolve plugin incompatibilities and enable the single-variant model required for Kotlin Multiplatform builds.

Do I need to split my KMP Android application module when upgrading to AGP 9.0?

Splitting your KMP Android application module is a mandatory path for AGP 9.0 migration, requiring you to separate the project into distinct modules to comply with new plugin limitations and structural requirements.

How do I handle kapt and BuildConfig breaking changes during AGP 9.0 migration?

Handling kapt, BuildConfig, and resource processing breaking changes during AGP 9.0 migration involves validating your project against known AGP 9.0 issues and adjusting your Kotlin and Android DSL configurations accordingly.