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.

referencesbuildconfig.md

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

When an Android module contains custom BuildConfig fields, the following steps are necessary to ensure a correct build.

Step 1: Enable the buildConfig build feature

In a build script:

android {
  buildFeatures {
    buildConfig = true
  }
}

In custom build-logic for an app module:

extensions.configure<com.android.build.api.dsl.ApplicationExtension> {
  buildFeatures {
    buildConfig = true
  }
}

In custom build-logic for a library module:

extensions.configure<com.android.build.api.dsl.LibraryExtension> {
  buildFeatures {
    buildConfig = true
  }
}

In custom build-logic using CommonExtension:

extensions.configure<com.android.build.api.dsl.CommonExtension> {
  buildFeatures {
    buildConfig = true
  }
}

Step 2: Migrate to the new API

Use the addCustomBuildConfigFields recipe from the gradle-recipes repository.

IMPORTANT: For BuildConfigFields with a type of String, the value field must include quotation marks as part of the String. For example:

BuildConfigField(
  type = "String",
  value = "\"Some value\"",
  comment = "Optional comment",
)

It is an error if the value field doesn't include quotation marks as part of the String. For example, value = "Some value" is an error . This is because the value is written out literally.

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 33 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