Engineering
kotlin-tooling-agp9-migration avatar

kotlin-tooling-agp9-migration

Automated migration guide for Kotlin Multiplatform (KMP) projects upgrading to Android Gradle Plugin (AGP) 9.0+, covering plugin replacement, DSL updates, and project structure restructuring.

Introduction

This skill acts as an expert migration assistant for developers transitioning Kotlin Multiplatform (KMP) projects to Android Gradle Plugin (AGP) 9.0 and beyond. AGP 9.0 introduces breaking changes, specifically the incompatibility between legacy Android plugins and KMP, requiring a shift to the new com.android.kotlin.multiplatform.library plugin. The skill provides a systematic approach to auditing dependencies, modernizing build scripts, and implementing the new recommended project structure where KMP modules and Android application modules are decoupled. It is designed for Android and KMP developers facing build failures or structural roadblocks during major toolchain upgrades.

  • Performs comprehensive project analysis using included scripts to identify plugin configurations, version catalog usage, and potential source set conflicts.

  • Guides the transition from top-level android {} blocks to the encapsulated kotlin { android {} } configuration model.

  • Automates the migration of source directory structures (e.g., src/androidMain, src/androidHostTest) to align with KMP conventions.

  • Provides expert-level instructions for migrating kapt to KSP or com.android.legacy-kapt, and managing resource/test enablement in a multiplatform context.

  • Supports architectural decision-making by offering clear paths (Path A, B, or C) for simple library updates versus complex application module splitting.

  • Start by running the built-in project analysis script to generate a summary of module types and current plugin statuses.

  • Follow the step-by-step checklist to ensure namespace settings, consumer ProGuard rules, and build variant resolutions are handled correctly.

  • Use this skill when encountering errors related to AGP 9.0, multiplatform plugin incompatibility, or when needing to refactor a monolithic project into the new JetBrains standard structure.

  • Note thatBuildConfig support is removed in KMP libraries, and the skill provides workarounds using expected/actual patterns for configuration management.

  • Always verify version catalog consistency (libs.versions.toml) before executing manual modifications to build.gradle.kts files.

Repository Stats

Stars
410
Forks
12
Open Issues
17
Language
Shell
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 06:21 PM
View on GitHub