원클릭으로
agp-9-upgrade
// Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9
// Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9
Use when given a Figma URL or node and asked to translate it into MEGA Android Jetpack Compose code, before writing any UI code. Triggers include "implement this Figma", "build this design", "translate Figma to Compose", or any message containing a figma.com link plus a request for Compose / Android UI. Encodes MEGA's Core-UI component mapping, design-token rules, and the rule that existing screens MUST be located before any new code is written.
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.
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.
Analyze a UI screenshot and identify which MEGA core-ui library components match the visible elements. Extracts component metadata from the sources.jar and performs text + visual matching against component screenshots.
Create, update, and refactor Android Compose screens with Navigation3 destinations. Creates stateless Screen composables, Destination files (NavKey + EntryProviderScope extension), and registers destinations in FeatureDestination classes. Supports simple and parameterized NavKeys, navigation callbacks, metadata, and assisted ViewModel injection. Does NOT create ViewModels (use /viewmodel for that).
Android PR Code Review skill. Performs a comprehensive code review on the current Git repository's PR or specified code changes. Covers all review dimensions including architecture, Kotlin code quality, Android platform best practices, performance, security, and testability — along with a standardized output format. Can also be used as a standalone reference for Android review standards.
| 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.