agp-9-upgrade
यह क्या करती है
यह स्किल Android प्रोजेक्ट को Android Gradle Plugin 9 पर ले जाती है और उसके लिए ज़रूरी डिपेंडेंसी अपडेट करती है। यह उन Android डेवलपरों के लिए है जो यह अपग्रेड कर रहे हैं। यह Kotlin Multiplatform प्रोजेक्ट को कवर नहीं करती।
कब इस्तेमाल करें
- ✓जब आपके Android प्रोजेक्ट में पुराना Android Gradle Plugin चल रहा हो और आप वर्शन 9 पर जाना चाहते हों।
- ✓जब Android Gradle Plugin 9 अपग्रेड से आपका बिल्ड टूट जाए और आपको माइग्रेशन के चरण चाहिए हों।
- ✓जब आप चाहते हैं कि KSP या Hilt को Android Gradle Plugin 9 के साथ चलने वाले वर्शन पर अपडेट किया जाए।
Skill का लिंक
https://github.com/android/skills/blob/main/build-system/agp/agp-9-upgrade/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Android प्रोजेक्ट को Android Gradle Plugin 9 पर अपग्रेड कीजिए और जो टूटे उसे ठीक कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल पहले आपका मौजूदा प्लगइन वर्शन जाँचती है। अगर वह 9 से पुराना है, तो आपसे Android Studio का Upgrade Assistant चलाने को कहती है, जब तक आप उस चरण को छोड़ने के लिए न कहें। फिर वह माइग्रेशन गाइड का पालन करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Migration guide
See the AGP 9 migration guide for the major changes, many breaking, in AGP 9 compared to AGP 8.
Requirements
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 to update to the latest stable version of AGP, and confirm when done. The user may also request that this requirement be skipped; if this is the case, you should update the version of AGP to the latest stable version as part of the AGP 9 migration. See the AGP 9 migration guide for how to do this.
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.
Do not use this skill for KMP projects, as they are unsupported.
Steps
If AGP is already at 9 or higher, then do the following:
Step 1: Update dependencies
If KSP (com.google.devtools.ksp) is used in the project, ensure it is on
version 2.3.6 or higher.
If Hilt is used in the project, ensure it is on version 2.59.2 or higher.
Step 2: Migrate to built-in Kotlin
See the guide for detailed information.
Step 3. Migrate to the new AGP DSL
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.
Step 4. Migrate kapt to KSP or legacy-kapt
If KSP (com.google.devtools.ksp) or kapt (org.jetbrains.kotlin.kapt) are
used in the project, see KSP, kapt, and legacy-kapt for detailed migration
steps.
Step 5. BuildConfig
If any Android module contains custom BuildConfig fields, see BuildConfig for detailed information.
Step 6. Update gradle.properties
After the migration, check gradle.properties. Remove the following flags:
- android.builtInKotlin
- android.newDsl
- android.uniquePackageNames
- android.enableAppCompileTimeRClass
Additionally, delete all temporary files you've created.
Guidelines
- Never write or run python scripts.
- Only search the Gradle dependency cache when inspecting external dependencies, and only as a last resort.
- Never add
android.disallowKotlinSourceSets=falsetogradle.properties. - When verifying changes, don't run the
cleantask. This is a waste of time.
Verification
After migration, verify the following:
- Gradle IDE sync succeeds.
./gradlew helpsucceeds../gradlew build --dry-runsucceeds.
Troubleshooting
Paparazzi v2.0.0-alpha04 and lower versions have issues with AGP 9. See references/paparazzi-gradle-9.md for details.
अक्सर पूछे जाने वाले सवाल
क्या पहले Upgrade Assistant चलाना ज़रूरी है?
अगर प्रोजेक्ट 9 से पुराने वर्शन पर है, तो स्किल उसे चलाने को कहती है, जब तक आप उस चरण को छोड़ने के लिए न कहें।
क्या यह Kotlin Multiplatform प्रोजेक्ट में काम करता है?
नहीं। ऐसे प्रोजेक्ट इस स्किल में समर्थित नहीं हैं।
कौन से और टूल अपडेट करने पड़ते हैं?
KSP और Hilt जैसे कुछ टूल को न्यूनतम वर्शन चाहिए, और स्किल उन्हें अपडेट करती है।
जानकारी
लेखक का मूल विवरण
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.
repo: android/skills
लोकप्रियता
- GitHub स्टार
- 10k
- रैंकिंग में स्थान
- #11907
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 29/10/2026
कमेंट
- …
इस repository की और skills
camerax
10kआपके एजेंट को CameraX से Android कैमरा फ़ीचर बनाने में मदद करती है, जिसमें वीडियो रिकॉर्डिंग, हार्डवेयर कंट्रोल, ML Kit और Media3 इफ़ेक्ट शामिल हैं।
android-for-cars-parked-apps
10kआपके एजेंट को Android वीडियो, गेम या ब्राउज़र ऐप को Android Auto और Android Automotive पर parked ऐप के रूप में चलाने के लिए ढालने में मदद करती है।
appfunctions
10kआपके एजेंट को Android ऐप के मुख्य काम ढूँढकर उन्हें AppFunctions के रूप में देने में मदद करती है, ताकि AI एजेंट और वॉइस कमांड उन्हें चला सकें।
litert-lm
10kआपके एजेंट को Android ऐप बनाने में मदद करती है, जो LiteRT-LM Kotlin API से डिवाइस पर एक खुला टेक्स्ट AI मॉडल चलाता है।
मिलती-जुलती skills
android-clean-architecture
280kयह आपके एजेंट को Android projects को व्यवस्थित तरीके से संभालने देता है। यह code को ऐसा ढांचा देता है कि उसकी देखभाल और नए features जोड़ना आसान हो।
compose-multiplatform-patterns
280kKMP projects में Compose Multiplatform और Jetpack Compose patterns इस्तेमाल करने में आपके एजेंट की मदद करता है। इसमें state, navigation, theming और performance शामिल हैं।
dart-flutter-patterns
280kयह आपके एजेंट को Dart और Flutter apps के लिए code लिखने देता है। यह आधुनिक patterns इस्तेमाल करके मज़बूत और आसानी से संभलने वाले apps बनाता है।