Index of every page on this site: llms.txt
All skills
android avatar

/agp-9-upgrade

@7f7b217
by androidandroid/skills11k stars
703
Run it yourself

Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9. Do not use this skill for migrating Kotlin Multiplatform (KMP) projects.

Use this Skill: https://skilld.dev/gh/android/skills/agp-9-upgrade

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesksp-kapt.md

≈450 tokens on demand. Your agent reads this file only when SKILL.md points to it.

When migrating to built-in Kotlin, it is important to consider usage of kapt and the org.jetbrains.kotlin.kapt (also known as the kotlin("kapt")) plugin. The goal is to migrate as many kapt usages to ksp as possible.

Follow these steps when migrating kapt:

1. Remove all references to the org.jetbrains.kotlin.kapt plugin

The org.jetbrains.kotlin.kapt (also known as kotlin("kapt")) plugin is incompatible with built-in Kotlin. Remove it when migrating to built-in Kotlin.

2. Check each usage of kapt

Check each usage of kapt to see if it is compatible with ksp. To check if a dependency is compatible with ksp, inspect the dependency's jar. For it to be compatible with ksp, the jar must have a file, META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider. If it does not, it is incompatible with ksp.

For example, the androidx.room:room-compiler library is compatible with KSP since version 2.3.0-beta02. We can verify this by finding the jar file in the Gradle caches directory, which is typically located at ~/.gradle/caches/modules-2/files-2.1/ on Linux and Mac. In this specific case, the androidx.room:room-compiler dependency is located at ~/.gradle/caches/modules-2/files-2.1/androidx.room/room-compiler/.

More generally, you can find a dependency by looking in ~/.gradle/caches/modules-2/files-2.1/group-name/artifact-name/.

3. Migrate to KSP where possible

For each usage of kapt that is compatible with ksp, use ksp. The prior step explains how to check compatibility.

4. Apply legacy-kapt

If a Gradle module has kapt dependencies that cannot be migrated to ksp because they are incompatible (see step 2), then leave that dependency alone and apply the com.android.legacy-kapt plugin.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    The skill upgrades Android projects to AGP 9. It executes build commands and reads dependency files from the local Gradle cache to perform upgrades, so ensure the project being upgraded is from a trusted source.

  • Socket6d

    No alerts

  • Snyktoday

    Risk: LOW · No issues

Signed by skilld at 7f7b217. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 37 minutes ago.

Activeupdated yesterday
Other metadata
metadata
{
  "author": "Google LLC",
  "last-updated": "2026-11-21",
  "keywords": [
    "Android Gradle Plugin 9",
    "AGP 9",
    "AGP Upgrade",
    "AGP Migration",
    "New AGP DSL",
    "Migrate to built-in Kotlin"
  ]
}

README badge

README badge for android/skills/agp-9-upgrade