Migrate to Google Play Billing Library 9.1.0#842
Open
SpertsyanKM wants to merge 4 commits into
Open
Conversation
- Bump billingclient 8.1.0 -> 9.1.0 - Bump compileSdk/targetSdk to 35 (required by PBL 9) - Handle nullable PackageInfo.versionName (nullability tightened in SDK 35) - Fix stale SkuDetails KDoc mention Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
SkuDetails class was removed in Billing Library 9. The helpers had no usages left in tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
mockSubsSkuDetailsJson/mockInAppSkuDetailsJson, their constants and the billingclient wildcard import had no consumers left after removing the SkuDetails-based helpers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
mockSubsPurchase/mockInAppPurchase/mockIncorrectSubsPurchase and the whole Constants object had no usages; only the reflection helpers remain in test utils. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the SDK from Google Play Billing Library 8.1.0 to 9.1.0.
The heavy v7→v8 migration was already done earlier, so this step is small:
com.android.billingclient:billing8.1.0 → 9.1.0compileSdk/targetSdk34 → 35 insdk,nocodes,sample(PBL 9 targets SDK 35)PackageInfo.versionNameinEnvironmentProvider(nullability tightened in SDK 35) — falls back toUNKNOWNSkuDetails-based test helpers (SkuDetailsclass removed in PBL 9) and a stale KDoc mentionBehavior change shipped by PBL 9 (no code change needed)
When the Play Store app is blocked by the system (e.g. OEM kids mode), connection setup now finishes with
BILLING_UNAVAILABLEinstead of genericERROR. In ourBillingClientHolderthis routes into the existingonBillingClientUnavailablebranch, so queued requests fail fast with a meaningfulBillingUnavailableerror instead of hanging until reconnect — strictly better than the previous behavior.Not included (possible follow-up): exposing new v9 sub-response codes (
PAYMENT_DECLINED_DUE_TO_INSUFFICIENT_FUNDS,USER_INELIGIBLE) through the public error API.Testing
:sdk:assembleRelease,:nocodes:assembleRelease— OK:sample:assembleDebug— OK (samples are not CI-gated):sdk:testReleaseUnitTest,:nocodes:testReleaseUnitTest— OKdetektAll— OKLinear: DEV-1196
🤖 Generated with Claude Code
https://claude.ai/code/session_016gkK8UCtMzk324y5meDWLw