Skip to content

Upgrade Purchasely SDK to 6.0.0#9

Open
chouaibMo wants to merge 3 commits into
mainfrom
chore/sdk-v6-migration
Open

Upgrade Purchasely SDK to 6.0.0#9
chouaibMo wants to merge 3 commits into
mainfrom
chore/sdk-v6-migration

Conversation

@chouaibMo
Copy link
Copy Markdown

Summary

Migrate the Android integration to Purchasely SDK v6 per MIGRATION_V6.md.

  • Replace removed setPaywallActionsInterceptor with per-action Purchasely.interceptAction<…> suspend handlers; bridge them to the existing Observer-mode billing flow via a pendingResult continuation resolved to PLYInterceptResult.{SUCCESS,NOT_HANDLED,FAILED} based on TransactionResult.
  • Switch to allowDeeplink, handleDeeplink, the single-arg start { error -> } callback, and PLYRunningMode.Observer (was PaywallObserver).
  • Move from fetchPresentation / PLYPresentationProperties to the PLYPresentation { placementId(...) }.preload() DSL and map display() / buildView() callbacks to PLYPresentationOutcome (PLYPurchaseResultDisplayResult).
  • Re-anchor presentation imports under io.purchasely.ext.presentation.

Collateral: Purchasely 6.0.0 transitively pulls Google Play Billing 8.x; updated PurchaseManager.queryProductDetailsAsync to the new QueryProductDetailsResult.productDetailsList shape.

mavenLocal() is temporarily added to dependency resolution — remove once 6.0.0 ships to Maven Central.

Test plan

  • ./gradlew :app:testDebugUnitTest — 178/178 passing locally against a publishToMavenLocal build of io.purchasely:core:6.0.0 + io.purchasely:google-play:6.0.0.
  • Smoke test paywall display + Observer-mode purchase + restore on a device.
  • Verify the success_payment chain still fires after a successful purchase.
  • Verify deeplink handling via handleDeeplink.
  • Remove mavenLocal() from settings.gradle.kts once 6.0.0 is on Maven Central, and re-run the test suite.

🤖 Generated with Claude Code

Migrate the Android integration to the v6 public API per MIGRATION_V6.md:

- Replace the removed global setPaywallActionsInterceptor with per-action
  Purchasely.interceptAction<…> suspend handlers; bridge them to the existing
  Observer-mode billing flow with a pendingResult continuation that resolves
  to PLYInterceptResult.SUCCESS / NOT_HANDLED / FAILED based on the emitted
  TransactionResult.
- Switch to allowDeeplink, handleDeeplink, the single-arg start { error -> }
  callback, and PLYRunningMode.Observer (was PaywallObserver).
- Move from fetchPresentation/PLYPresentationProperties to the
  PLYPresentation { placementId(...) }.preload() DSL and map display() /
  buildView() callbacks to PLYPresentationOutcome (PLYPurchaseResult →
  DisplayResult).
- Re-anchor presentation imports under io.purchasely.ext.presentation.

Collateral: Purchasely 6.0.0 transitively pulls Google Play Billing 8.x;
update PurchaseManager.queryProductDetailsAsync to the new
QueryProductDetailsResult.productDetailsList shape.

Add mavenLocal() to dependency resolution (remove once 6.0.0 ships to
Maven Central).

Rewrite PurchaselyWrapperTest against the new suspend interceptors and
flow ordering. ./gradlew :app:testDebugUnitTest — 178/178 passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chouaibMo chouaibMo changed the title chore(android): upgrade Purchasely SDK to 6.0.0 Upgrade Purchasely SDK to 6.0.0 May 18, 2026
chouaibMo and others added 2 commits May 18, 2026 18:43
AGP 9.2.1 requires Gradle ≥ 9.4.1 (MIGRATION_V6.md §7). The committed
wrapper was still 8.13, which broke CI even though local builds passed
because the dev machine had 9.4.1 cached.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ose plugin setup

- Switch Purchasely SDK init from Builder chain to the new `Purchasely { ... }` Kotlin DSL entrypoint (idiomatic v6).
- Drop redundant `kotlin.android` plugin alias: AGP 9.2.1 + `kotlin.plugin.compose` 2.2.10 already register the Kotlin extension (was causing "extension already registered" if re-applied).
- Add `mavenLocal()` to repositories for local SDK snapshot testing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kherembourg kherembourg marked this pull request as ready for review May 22, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants