# /play-billing-library-version-upgrade: Upgrade Play Billing Library without missing breaking changes

Source: https://trendhub.net/skills/android-skills/play-billing-library-version-upgrade
Skill folder: https://github.com/android/skills/tree/main/play/play-billing-library-version-upgrade
Pack: Android Skills (https://trendhub.net/skills/android-skills)
Works with: Android CLI (detected agents), Claude Code, Codex

This skill moves an app from any older Play Billing Library to the latest stable release. The agent works out the version the code effectively uses, plans a direct or stepped path, builds a checklist from migration guides and release notes, refactors by intent rather than search and replace, and verifies with builds and tests at each step before writing a final report.

## When to use it

- Google Play is pushing you off a deprecated billing library version.
- Your billing code still uses old APIs such as SkuDetails.
- You need to jump several major billing versions at once.

## How it works

1. **Discover the real version**: The agent reads the declared dependency, tries a build, and if it fails infers the effective version from deprecated APIs still in use.
2. **Plan the path**: Within two major versions it migrates directly; further behind, it steps two major versions at a time.
3. **Build a checklist**: For each jump it combines the migration guide with release note deprecations and breaking changes into a list of concrete code changes.
4. **Refactor and verify**: It updates SDK and Gradle requirements, refactors by intent, builds after each intermediate version and runs tests and a clean build.
5. **Explain the result**: The final report says why each change was made and suggests new library features the app does not use yet.

## What it steers the agent away from

- Plain text replacement of billing APIs without understanding their purpose.
- Skipping intermediate builds on long upgrade paths.
- Trusting the version string when the code says otherwise.

## What it can touch

It edits Gradle files and billing code and runs Gradle sync, build, test and assembleDebug tasks.

## Pairs well with

- `/agp-9-upgrade`
- `/testing-setup`

## Questions

### How does it decide on a stepped migration?

If the effective version is more than two major versions behind the target, it upgrades two major versions at a time.

### Will it tell me what changed?

Yes. It announces the plan up front, summarises each step and ends with a report explaining the reasons for the changes.
