Android agp upgrade

From HoangNguyen0403/agent-skills-standard · View interactive version

Android agp upgrade is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.

How to use this skill

Skill file

AGP 9 Upgrade Workflow

**Priority: P1 (HIGH)**

Step-by-step workflow for upgrading an Android project to AGP 9.

Prerequisites

Step 1: Update dependencies

Step 2: Migrate to built-in Kotlin

AGP 9 includes built-in Kotlin support — the org.jetbrains.kotlin.android plugin is no longer needed.

See migration guide for detailed steps.

Step 3: Migrate to the new AGP DSL

AGP 9 introduces a new DSL for android {} blocks. Key changes include namespace handling, build type configuration, and source set declarations.

See DSL migration for before/after examples.

Step 4: Migrate kapt to KSP or legacy-kapt

If the project uses kapt:

Step 5: Update BuildConfig

If any module uses custom BuildConfig fields, update to the new AGP 9 syntax.

Step 6: Clean up gradle.properties

Remove these flags after migration:

  1. android.builtInKotlin
  2. android.newDsl
  3. android.uniquePackageNames
  4. android.enableAppCompileTimeRClass

Guidelines

Verification

  1. ./gradlew help succeeds.
  2. ./gradlew build --dry-run succeeds.
  3. Gradle IDE sync succeeds.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.