一键导入
agp-9-upgrade
Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Creates a GitLab Merge Request for the current branch by auto-generating a structured description from the branch diff and pushing with GitLab push options.
Use when the developer asks to fix a Jira bug given a ticket ID or Jira link (e.g. "/fix-jira-bug AND-12345", "fix AND-12345"). End-to-end workflow: fetch the ticket, create a git worktree from latest develop, run multi-agent root cause analysis, get the fix plan approved by the developer, implement with a regression test, build and verify on a device via mobile-mcp, then commit and create a Merge Request.
Upload new Android strings to Weblate. Extracts new strings added in the current branch (compared to develop) from strings_shared.xml, writes them to the transifex/weblate/strings.xml file, runs the upload script, then optionally uploads a screenshot and maps it to the uploaded strings via the Weblate API.
Summarise a release's Failed / Feedback TestRail cases and post the standard "Android team" notice to Slack. Takes a version (e.g. v16.8), finds the matching release run in TestRail project 5, collects every test marked Failed or Feedback (excluding automated-test failures), groups them by assignee with Slack @-mentions and TestRail links, then sends the message to a given #channel or thread reply. If no Failed/Feedback cases are found, it sends nothing.
Symbolicate Android native crash logs from Firebase Crashlytics: /analyze-native-crash --version "16.4(261070708)(f33dd33fe8)" --log crash.txt Automatically downloads the matching debug libmega.so from Artifactory using the app version, then runs llvm-addr2line to resolve PC addresses to function names and source locations.
Backport a fix to a release branch and resolve the TestRail test that reported it. Takes a Jira key, TestRail test ID, or commit SHA, cherry-picks the fix from develop onto the target release branch, pushes, then posts a "Fixed" result back to the TestRail test (reassigning to the original reporter with a comment). The test can be reopened later if QA fails it again — re-run the skill each time.
| name | agp-9-upgrade |
| description | Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9 |
| license | Complete terms in LICENSE.txt |
| metadata | {"author":"Google LLC","keywords":["Android Gradle Plugin 9","AGP 9","AGP Upgrade","AGP Migration","New AGP DSL","Migrate to built-in Kotlin"]} |
See the AGP 9 migration guide for the major changes, many breaking, in AGP 9 compared to AGP 8.
If the user requests to update or migrate to AGP 9, first check the AGP version used in the project. If it is lower than 9, stop and ask the user to run the AGP Upgrade Assistant in Android Studio, and confirm when done.
Each version of AGP has its own set of compatibilities with other tools, such as Gradle, JDK, and Kotlin. The release notes for each of these versions will include a Compatibility table indicating the minimum versions for these tools.
If AGP is already at 9 or higher, then do the following:
See the guide for detailed information.
See the guide for detailed information.
See also gradle-recipes for examples on how to migrate old code to code that is compatible with AGP 9 and the new DSL.
If KSP (com.google.devtools.ksp) is used in the project, ensure it is on
version 2.3.6 or higher.
See KSP, kapt, and legacy-kapt for detailed information.
If any Android module contains custom BuildConfig fields, see BuildConfig for detailed information.
After the migration, check gradle.properties. Remove the following flags:
Additionally, delete all temporary files you've created.
android.disallowKotlinSourceSets=false to gradle.properties.clean task. This is a waste of time.After migration, verify the following:
./gradlew help succeeds../gradlew build --dry-run succeeds.Paparazzi v2.0.0-alpha04 and lower versions have issues with AGP 9. See references/paparazzi-gradle-9.md for details.