본문으로 건너뛰기
Skillpedia
모바일 앱10k · #11929

play-billing-library-version-upgrade

하는 일

이 스킬은 Android 프로젝트의 Google Play 결제 라이브러리를 최신 안정 버전으로 업그레이드하거나 옮깁니다. 사용하지 않도록 된 코드를 포함해 실제 시작 버전을 찾고 단계를 계획합니다. 앱 내 구매 코드를 관리하는 Android 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Android 앱이 오래된 Google Play 결제 라이브러리를 쓰고 있어 업데이트하고 싶을 때.
  • ✓SkuDetails 같은 사용하지 않는 결제 코드 때문에 앱 빌드가 실패할 때.
  • ✓여러 주요 결제 라이브러리 버전을 건너뛰어 단계별 계획이 필요할 때.

스킬 링크

https://github.com/android/skills/blob/main/play/play-billing-library-version-upgrade/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/android/skills/blob/main/play/play-billing-library-version-upgrade/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 Android 앱의 Google Play 결제 라이브러리를 최신 안정 버전으로 업그레이드해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 결제 의존성 버전을 확인한 뒤 빌드를 시도합니다. 빌드가 실패하면 사용하지 않는 결제 클래스를 찾아 실제 버전을 알아냅니다. 그다음 최신 안정 버전으로 직접 또는 단계별 마이그레이션을 계획합니다.

기술 내용 (원본 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

  1. Primary Check (Build Version) : Locate the project's billing dependency (e.g., com.android.billingclient:billing) in build.gradle, build.gradle.kts, or libs.versions.toml.
  2. Initial Compilation Test: Attempt to sync and build the project immediately.
  3. 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 SkuDetails is present, treat the baseline as PBL v7 or earlier (regardless of the version string in build.gradle).
  4. 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.gradle to meet SDK requirements (e.g., "PBL 9 requires compileSdk 35").
  • 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)

  1. Upgrade to the first major intermediate version in your path.
  2. Run ./gradlew assembleDebug to verify no intermediate breaking changes were missed.
  3. Repeat until you reach the final target version.

Step 4: Final Validation Checklist

  1. Smart Checklist Verification:
  2. Open references/version-checklist.md and locate the Smart Version-Specific Checklist.
  3. 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.
  4. Tests : Run all unit and implementation tests (./gradlew test).
  5. Clean Build : Verify the project completes a full clean build: ./gradlew clean assembleDebug. Then, run ./gradlew sync and ./gradlew build s
자주 묻는 질문

빌드 파일의 버전이 항상 맞지 않는 이유는 무엇인가요?

사용하지 않는 코드를 보면 앱이 실제로는 더 오래된 버전에 있다는 것을 알 수 있으므로, 스킬은 그 코드가 마지막으로 제공된 버전을 사용합니다.

단계별 마이그레이션은 언제 쓰나요?

앱이 최신 안정 버전보다 주요 버전 두 개 이상 뒤처져 있으면 스킬이 단계별 업그레이드를 계획합니다.

구매 흐름도 테스트하나요?

스킬은 업그레이드와 빌드 단계에 집중하므로, 구매 흐름은 직접 테스트해야 합니다.

상세 정보

작성자의 원본 설명

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
업데이트
2026. 10. 29.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬