From cae6f3ac5ac8bb02a1ff21d05a25094dc8c6d82c Mon Sep 17 00:00:00 2001 From: Ian Rumac Date: Mon, 27 Jul 2026 10:50:37 +0200 Subject: [PATCH 1/3] Update Google Play Billing Library to 9.1.0 Bumps the billing client from 8.0.0 to 9.1.0 and RevenueCat (test app) to 10.14.1. Billing 9 removes the SkuDetails APIs, so this drops the deprecated SuperwallBillingFlowParams.Builder.setSkuDetails and the unused internal SWProduct wrapper, and switches buildQueryPurchaseHistoryParams over to QueryPurchasesParams. See https://developer.android.com/google/play/billing/migrate-gpblv9 --- CHANGELOG.md | 11 +++++++++++ gradle/libs.versions.toml | 4 ++-- .../sdk/billing/BillingClientParamBuilders.kt | 5 ++--- .../main/java/com/superwall/sdk/billing/SWProduct.kt | 7 ------- .../billing/observer/SuperwallBillingFlowParams.kt | 7 ------- version.env | 2 +- 6 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 superwall/src/main/java/com/superwall/sdk/billing/SWProduct.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 05dc905d1..d193367a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/Superwall-Android/releases) on GitHub. +## 2.8.0 + +## Enhancements +- Updates Google Play Billing Library from 8.0.0 to 9.1.0. See the [Play Billing Library 9 migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) for the full list of changes. + +## Breaking Changes +- Removes the deprecated `SuperwallBillingFlowParams.Builder.setSkuDetails(SkuDetails)`. Billing Library 9 removes `SkuDetails` entirely, so this method can no longer exist. Use `setProductDetailsParamsList(...)` with `ProductDetails` instead. +- Removes the unused internal `com.superwall.sdk.billing.SWProduct`, which wrapped the now-removed `SkuDetails`. +- **Impact:** if your app still calls the removed Billing Library APIs (`SkuDetails`, `SkuDetailsParams`, `querySkuDetailsAsync`, `queryPurchaseHistoryAsync`, `BillingClient.SkuType`, or the no-arg `enablePendingPurchases()`), it will no longer compile once it picks up Billing 9 through this SDK. Migrate those call sites to the `ProductDetails` APIs before upgrading; the [migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) has a mapping of every removed API to its replacement. +- **Please test your billing and purchasing flows before shipping this upgrade.** Because the Billing Library is resolved to a single version across your app, upgrading Superwall also upgrades Billing for everything else that depends on it. If you use Google Play Billing directly, or another subscription provider such as RevenueCat, Adapty or Qonversion, make sure that provider's SDK supports Billing 9 and run through purchase, restore and subscription-status flows end to end. + ## 2.7.22 ## Enhancements diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 268687245..50317a942 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -billing_version = "8.0.0" +billing_version = "9.1.0" browser_version = "1.8.0" gradle_plugin_version = "8.6.1" jna_version = "5.14.0@aar" @@ -7,7 +7,7 @@ kotlinxCoroutinesGuavaVersion = "1.9.0" leakcanaryAndroidVersion = "2.14" lifecycleProcessVersion = "2.8.5" orchestratorVersion = "1.5.0" -revenue_cat_version = "9.2.0" +revenue_cat_version = "10.14.1" compose_version = "2024.12.01" kotlinx_serialization_json_version = "1.7.2" activity_compose_version = "1.9.3" diff --git a/superwall/src/main/java/com/superwall/sdk/billing/BillingClientParamBuilders.kt b/superwall/src/main/java/com/superwall/sdk/billing/BillingClientParamBuilders.kt index 685084331..20577b10c 100644 --- a/superwall/src/main/java/com/superwall/sdk/billing/BillingClientParamBuilders.kt +++ b/superwall/src/main/java/com/superwall/sdk/billing/BillingClientParamBuilders.kt @@ -2,14 +2,13 @@ package com.superwall.sdk.billing import com.android.billingclient.api.BillingClient import com.android.billingclient.api.QueryProductDetailsParams -import com.android.billingclient.api.QueryPurchaseHistoryParams import com.android.billingclient.api.QueryPurchasesParams -internal fun @receiver:BillingClient.ProductType String.buildQueryPurchaseHistoryParams(): QueryPurchaseHistoryParams? = +internal fun @receiver:BillingClient.ProductType String.buildQueryPurchaseHistoryParams(): QueryPurchasesParams? = when (this) { BillingClient.ProductType.INAPP, BillingClient.ProductType.SUBS, - -> QueryPurchaseHistoryParams.newBuilder().setProductType(this).build() + -> QueryPurchasesParams.newBuilder().setProductType(this).build() else -> null } diff --git a/superwall/src/main/java/com/superwall/sdk/billing/SWProduct.kt b/superwall/src/main/java/com/superwall/sdk/billing/SWProduct.kt deleted file mode 100644 index 07512f9d4..000000000 --- a/superwall/src/main/java/com/superwall/sdk/billing/SWProduct.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.superwall.sdk.billing - -import com.android.billingclient.api.SkuDetails - -data class SWProduct( - val skuDetails: SkuDetails, -) diff --git a/superwall/src/main/java/com/superwall/sdk/billing/observer/SuperwallBillingFlowParams.kt b/superwall/src/main/java/com/superwall/sdk/billing/observer/SuperwallBillingFlowParams.kt index 77f8bb5d8..eb91f1007 100644 --- a/superwall/src/main/java/com/superwall/sdk/billing/observer/SuperwallBillingFlowParams.kt +++ b/superwall/src/main/java/com/superwall/sdk/billing/observer/SuperwallBillingFlowParams.kt @@ -2,7 +2,6 @@ package com.superwall.sdk.billing.observer import com.android.billingclient.api.BillingFlowParams import com.android.billingclient.api.ProductDetails -import com.android.billingclient.api.SkuDetails class SuperwallBillingFlowParams private constructor( internal val params: BillingFlowParams, @@ -39,12 +38,6 @@ class SuperwallBillingFlowParams private constructor( builder.setProductDetailsParamsList(productDetailsParamsList.map { it.toOriginal() }) } - @Deprecated("Use setProductDetailsParamsList instead") - fun setSkuDetails(skuDetails: SkuDetails): Builder = - apply { - builder.setSkuDetails(skuDetails) - } - fun setSubscriptionUpdateParams(params: SubscriptionUpdateParams): Builder = apply { builder.setSubscriptionUpdateParams(params.toOriginal()) diff --git a/version.env b/version.env index e457ae8fd..adafaa0b1 100644 --- a/version.env +++ b/version.env @@ -1 +1 @@ -SUPERWALL_VERSION=2.7.22 +SUPERWALL_VERSION=2.8.0 From bdcdfa689f41e27618868061a104e56659621b08 Mon Sep 17 00:00:00 2001 From: Ian Rumac Date: Mon, 27 Jul 2026 18:53:52 +0200 Subject: [PATCH 2/3] Expand 2.8.0 changelog entry Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d68121f0..9419bcc74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,12 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superw ## Enhancements - Updates Google Play Billing Library from 8.0.0 to 9.1.0. See the [Play Billing Library 9 migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) for the full list of changes. +- Updates the RevenueCat SDK used by the sample apps from 9.2.0 to 10.14.1 for Billing 9 compatibility. ## Breaking Changes - Removes the deprecated `SuperwallBillingFlowParams.Builder.setSkuDetails(SkuDetails)`. Billing Library 9 removes `SkuDetails` entirely, so this method can no longer exist. Use `setProductDetailsParamsList(...)` with `ProductDetails` instead. - Removes the unused internal `com.superwall.sdk.billing.SWProduct`, which wrapped the now-removed `SkuDetails`. +- Internal purchase-history queries now resolve current purchases via `QueryPurchasesParams` — Billing Library 9 removes the purchase-history APIs (`queryPurchaseHistoryAsync`, `QueryPurchaseHistoryParams`). - **Impact:** if your app still calls the removed Billing Library APIs (`SkuDetails`, `SkuDetailsParams`, `querySkuDetailsAsync`, `queryPurchaseHistoryAsync`, `BillingClient.SkuType`, or the no-arg `enablePendingPurchases()`), it will no longer compile once it picks up Billing 9 through this SDK. Migrate those call sites to the `ProductDetails` APIs before upgrading; the [migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) has a mapping of every removed API to its replacement. - **Please test your billing and purchasing flows before shipping this upgrade.** Because the Billing Library is resolved to a single version across your app, upgrading Superwall also upgrades Billing for everything else that depends on it. If you use Google Play Billing directly, or another subscription provider such as RevenueCat, Adapty or Qonversion, make sure that provider's SDK supports Billing 9 and run through purchase, restore and subscription-status flows end to end. From 2bb7304583a3de84c554807307a9e5568c7e8349 Mon Sep 17 00:00:00 2001 From: Ian Rumac Date: Mon, 27 Jul 2026 18:59:12 +0200 Subject: [PATCH 3/3] Raise minSdk to 23 for Billing 9 and add changelog warning Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 4 ++++ app/build.gradle.kts | 2 +- example/app/build.gradle.kts | 2 +- superwall-compose/build.gradle.kts | 2 +- superwall/build.gradle.kts | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9419bcc74..6e56d3b77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superw - **Impact:** if your app still calls the removed Billing Library APIs (`SkuDetails`, `SkuDetailsParams`, `querySkuDetailsAsync`, `queryPurchaseHistoryAsync`, `BillingClient.SkuType`, or the no-arg `enablePendingPurchases()`), it will no longer compile once it picks up Billing 9 through this SDK. Migrate those call sites to the `ProductDetails` APIs before upgrading; the [migration guide](https://developer.android.com/google/play/billing/migrate-gpblv9) has a mapping of every removed API to its replacement. - **Please test your billing and purchasing flows before shipping this upgrade.** Because the Billing Library is resolved to a single version across your app, upgrading Superwall also upgrades Billing for everything else that depends on it. If you use Google Play Billing directly, or another subscription provider such as RevenueCat, Adapty or Qonversion, make sure that provider's SDK supports Billing 9 and run through purchase, restore and subscription-status flows end to end. +## ⚠️ Minimum SDK version raised to 23 + +Google Play Billing Library 9 requires Android 6.0 (API 23), so the SDK's `minSdk` is now **23** (previously 21). If your app's `minSdk` is below 23, you'll need to raise it to pick up this release — devices on Android 5.x will no longer receive app updates that include this SDK version. + ## 2.7.23 ## Fixes diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d69a10500..f180f86d1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -12,7 +12,7 @@ android { defaultConfig { applicationId = "com.superwall.superapp" - minSdk = 22 + minSdk = 23 targetSdk = 34 versionCode = 2 versionName = "1.0.0" diff --git a/example/app/build.gradle.kts b/example/app/build.gradle.kts index a10fae23d..2246c2701 100644 --- a/example/app/build.gradle.kts +++ b/example/app/build.gradle.kts @@ -10,7 +10,7 @@ android { defaultConfig { applicationId = "com.superwall.superapp" - minSdk = 22 + minSdk = 23 targetSdk = 34 versionCode = 1 versionName = "1.0.0" diff --git a/superwall-compose/build.gradle.kts b/superwall-compose/build.gradle.kts index d08bede1c..39150259b 100644 --- a/superwall-compose/build.gradle.kts +++ b/superwall-compose/build.gradle.kts @@ -18,7 +18,7 @@ android { compileSdk = 35 defaultConfig { - minSdk = 22 + minSdk = 23 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/superwall/build.gradle.kts b/superwall/build.gradle.kts index a176a768c..7561d19d4 100644 --- a/superwall/build.gradle.kts +++ b/superwall/build.gradle.kts @@ -31,7 +31,7 @@ android { namespace = "com.superwall.sdk" defaultConfig { - minSdkVersion(21) + minSdkVersion(23) targetSdkVersion(33) aarMetadata {