play-billing-library-version-upgrade
यह क्या करती है
यह स्किल Android प्रोजेक्ट की Google Play Billing Library को नवीनतम स्थिर वर्शन पर अपग्रेड या माइग्रेट करती है। यह असली शुरुआती वर्शन ढूँढती है, deprecated कोड सहित, और चरण तय करती है। यह उन Android डेवलपरों के लिए है जो in-app purchase कोड संभालते हैं।
कब इस्तेमाल करें
- ✓जब आपका Android ऐप Google Play Billing Library के पुराने वर्शन पर है और आप उसे अपडेट करना चाहते हैं।
- ✓जब आपके ऐप का बिल्ड deprecated billing कोड, जैसे SkuDetails, की वजह से टूट रहा हो।
- ✓जब आपको billing library के कई बड़े वर्शनों में से गुज़रने की चरण-दर-चरण योजना चाहिए।
Skill का लिंक
https://github.com/android/skills/blob/main/play/play-billing-library-version-upgrade/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Android ऐप में Google Play Billing Library को नवीनतम स्थिर वर्शन पर अपग्रेड कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल billing dependency का वर्शन जाँचती है, फिर एक build चलाकर देखती है। build टूटे तो वह deprecated billing classes खोजकर असली वर्शन पता करती है। फिर वह नवीनतम स्थिर रिलीज़ तक सीधा या चरणों वाला माइग्रेशन तय करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Phase 0: Intent Message
Reporting Action: Before proceeding, immediately tell the user: "I will upgrade Play Billing Library to the latest version."
Phase 1: Discovery & Situational Awareness
- Primary Check (Build Version) : Locate the project's billing dependency (e.g.,
com.android.billingclient:billing) inbuild.gradle,build.gradle.kts, orlibs.versions.toml. - Initial Compilation Test: Attempt to sync and build the project immediately.
- Fallback Discovery (Effective Version) :
- Trigger: Only if the build fails immediately, scan the source code for deprecated artifacts.
- Logic : The presence of deprecated APIs indicates the "Effective Version" ---defined as the version where those specific APIs were last available, not when they were introduced.
- Example : If
SkuDetailsis present, treat the baseline as PBL v7 or earlier (regardless of the version string inbuild.gradle).
- Identify Target & Path : Access the version tool or release notes to find the latest stable version and calculate a [Direct/Stepped] migration path based on the Effective Version baseline.
- Calculate Migration Path :
- If the Effective Version is within 2 major versions of the target: Plan a Direct Migration.
- If it is more than 2 major versions behind: Plan a Stepped Migration. Migrate by two major versions at a time (e.g., v4 -> v6 -> v8) until you are within two versions of the target.
- Reporting Action: Before proceeding, tell the user: "I've detected you are effectively on PBL [Current] and the latest is [Target]. I am planning a [direct/stepped] migration path."
Phase 2: Contextual Document Mapping & Planning
For every major version jump identified in your path, you MUST synthesize instructions from:
- Migration Guide (where
[X]is the target major version). - Release Highlights : The "Deprecations" and "Breaking Changes" sections of the relevant Release Notes.
- Developer Documentation: Consult your knowledge of the Google Play Billing documentation regarding the relevant features used in this app (e.g., Subscriptions, One-Time Products).
- Develop the Plan: Identify every specific code change required (API removals, class replacements, logic shifts) and print this out as a checklist.
Phase 3: Instructions for Execution
Reporting Action: For each of the following steps, give a brief explanation of what you will be doing prior to execution, and a brief summary of what you accomplished afterwards.
Step 1: SDK & Environment Alignment
- Action : Update
build.gradleto meet SDK requirements (e.g., "PBL 9 requirescompileSdk35"). - Gradle Version: Verify if the new library requires a newer Android Gradle Plugin (AGP) or Kotlin version.
Step 2: Intent-based Refactoring
Analyze the intent of the existing code rather than performing purely textual string replacement.
- Action : You MUST follow all deprecation instructions and refactor patterns from both the references/migration-logic.md section, the official migration guides, and the general documentation pages identified in Phase 2.
- Verification : Verify you are doing all steps from all documentation and then making sure you follow the specific directions from the checklist in the references.
Step 3: Sequential Verification (Only applicable for Stepped Migrations)
- Upgrade to the first major intermediate version in your path.
- Run
./gradlew assembleDebugto verify no intermediate breaking changes were missed. - Repeat until you reach the final target version.
Step 4: Final Validation Checklist
- Smart Checklist Verification:
- Open references/version-checklist.md and locate the Smart Version-Specific Checklist.
- Action: For every version between your [Detected Effective Version] and [Detected New Version], verify that every item has been addressed in the code using "Find in Files" or structural analysis.
- Tests : Run all unit and implementation tests (
./gradlew test). - Clean Build : Verify the project completes a full clean build:
./gradlew clean assembleDebug. Then, run./gradlew syncand./gradlew builds
अक्सर पूछे जाने वाले सवाल
build फ़ाइल में दिया वर्शन हमेशा सही क्यों नहीं होता?
deprecated कोड दिखा सकता है कि ऐप असल में पुराने वर्शन पर है, इसलिए स्किल वह वर्शन लेती है जहाँ वह कोड आखिरी बार उपलब्ध था।
चरणों वाला माइग्रेशन कब इस्तेमाल होता है?
जब ऐप नवीनतम स्थिर रिलीज़ से दो से ज़्यादा बड़े वर्शन पीछे हो, तब स्किल चरणों वाले अपग्रेड तय करती है।
क्या यह मेरा purchase फ़्लो टेस्ट करती है?
स्किल अपग्रेड और build चरणों पर केंद्रित है, इसलिए खरीद का टेस्ट आपको खुद करना चाहिए।
जानकारी
लेखक का मूल विवरण
Use this skill when upgrading or migrating an Android project from any legacy Google Play Billing Library (PBL) version to the latest stable version of PBL.
repo: android/skills
लोकप्रियता
- GitHub स्टार
- 10k
- रैंकिंग में स्थान
- #11929
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 29/10/2026
कमेंट
- …
इस repository की और skills
agp-9-upgrade
10kआपके एजेंट को Android ऐप को Android Gradle Plugin 9 पर ले जाने और उसके breaking changes सुधारने में मदद करती है। मल्टीप्लेटफ़ॉर्म प्रोजेक्ट के लिए नहीं।
camerax
10kआपके एजेंट को CameraX से Android कैमरा फ़ीचर बनाने में मदद करती है, जिसमें वीडियो रिकॉर्डिंग, हार्डवेयर कंट्रोल, ML Kit और Media3 इफ़ेक्ट शामिल हैं।
android-for-cars-parked-apps
10kआपके एजेंट को Android वीडियो, गेम या ब्राउज़र ऐप को Android Auto और Android Automotive पर parked ऐप के रूप में चलाने के लिए ढालने में मदद करती है।
appfunctions
10kआपके एजेंट को Android ऐप के मुख्य काम ढूँढकर उन्हें AppFunctions के रूप में देने में मदद करती है, ताकि 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 बनाता है।