Android Agp Upgrade
ASecurity1. Check the current AGP version. If it is below 8.x, run Android Studio’s AGP Upgrade Assistant first. 2. Verify that the Gradle, JDK, and Kotlin versions are compatible with AGP 9’s release notes. 3. Update the build files to the latest stable AGP 9.x version. Also update related dependencies as needed: - KSP: version 2.3.6 or newer - Hilt: version 2.59.2 or newer 4. Migrate to AGP 9’s built-in Kotlin support. Remove the `org.jetbrains.kotlin.android` plugin and follow the built-in Kotlin m...
- 584 stars
- 0 votes
- 0 copies
- 6 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 13 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill android-agp-upgrade --agent claude-codeAre you the author of Android Agp Upgrade?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-android-agp-upgrade-fe291b8b)# Migrating an Android project to AGP 9
1. Check the current AGP version. If it is below 8.x, run Android Studio’s AGP Upgrade Assistant first.
2. Verify that the Gradle, JDK, and Kotlin versions are compatible with AGP 9’s release notes.
3. Update the build files to the latest stable AGP 9.x version. Also update related dependencies as needed:
- KSP: version 2.3.6 or newer
- Hilt: version 2.59.2 or newer
4. Migrate to AGP 9’s built-in Kotlin support. Remove the `org.jetbrains.kotlin.android` plugin and follow the built-in Kotlin migration guidance.
5. Migrate each `android {}` block to the new AGP 9 DSL, including namespace handling, build type configuration, and source set declarations.
6. If the project uses `kapt`, migrate to KSP wherever the annotation processor supports it (for example, Room, Hilt, or Moshi). For processors without KSP support, use `legacy-kapt` as a bridge.
7. Update custom `BuildConfig` fields to the AGP 9 syntax.
8. Remove these migration flags from `gradle.properties`:
- `android.builtInKotlin`
- `android.newDsl`
- `android.uniquePackageNames`
- `android.enableAppCompileTimeRClass`
9. Verify the migration without running `clean`:
```bash
./gradlew help
./gradlew build --dry-run
```
Both commands should succeed, and the project should also sync successfully in the IDE.
Do not add `android.disallowKotlinSourceSets=false` to `gradle.properties`. This workflow does not apply to Kotlin Multiplatform projects.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
- trigger-6.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.