Upgrade Purchasely SDK to 6.0.0#9
Open
chouaibMo wants to merge 3 commits into
Open
Conversation
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>
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>
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
Migrate the Android integration to Purchasely SDK v6 per
MIGRATION_V6.md.setPaywallActionsInterceptorwith per-actionPurchasely.interceptAction<…>suspend handlers; bridge them to the existing Observer-mode billing flow via apendingResultcontinuation resolved toPLYInterceptResult.{SUCCESS,NOT_HANDLED,FAILED}based onTransactionResult.allowDeeplink,handleDeeplink, the single-argstart { error -> }callback, andPLYRunningMode.Observer(wasPaywallObserver).fetchPresentation/PLYPresentationPropertiesto thePLYPresentation { placementId(...) }.preload()DSL and mapdisplay()/buildView()callbacks toPLYPresentationOutcome(PLYPurchaseResult→DisplayResult).io.purchasely.ext.presentation.Collateral: Purchasely 6.0.0 transitively pulls Google Play Billing 8.x; updated
PurchaseManager.queryProductDetailsAsyncto the newQueryProductDetailsResult.productDetailsListshape.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 apublishToMavenLocalbuild ofio.purchasely:core:6.0.0+io.purchasely:google-play:6.0.0.handleDeeplink.mavenLocal()fromsettings.gradle.ktsonce 6.0.0 is on Maven Central, and re-run the test suite.🤖 Generated with Claude Code