feat: Add AppsFlyer SDK 7 kit (appsflyer-7) - #748
Conversation
AppsFlyer 7.0 relocated much of its public API and removed several methods, so v7 support ships as a new side-by-side kit following the existing multi-major pattern (braze-38..41). appsflyer-6 is untouched and stays pinned to [6.17.3,7.0.0), so existing v6 consumers are unaffected and v7 is opt-in. Changes applied to AppsFlyerKit.kt, verified against the real 6.17.3 and 7.0.1 artifacts rather than the release notes: - com.appsflyer.* -> com.appsflyer.share.* for AppsFlyerConsent, AppsFlyerConversionListener, AFInAppEventType, AFInAppEventParameterName and deeplink.*. AppsFlyerLib and AppsFlyerProperties did not move. - start(Context) removed -> start() - setUserEmails(EmailsCryptType, ...) and the EmailsCryptType enum removed -> setUserEmail(String) - AppsFlyerConversionListener no longer declares onAppOpenAttribution or onAttributionFailure; both overrides were empty no-ops - minSdk 19 -> 21, mandated by the v7 AAR Event and parameter constants and the AppsFlyerConsent 4-arg constructor are unchanged, so the commerce and consent logic needed no edits. The AppsFlyerConsent unit-test stub moved to com/appsflyer/share to keep shadowing the real class. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR SummaryMedium Risk Overview The kit implementation adapts to AppsFlyer 7 breaking API changes: imports for consent, conversion, in-app events, and deeplinks move to Also included are a Kotlin example app, README migration notes, unit tests (with test stubs under the new package layout), and repo wiring in Reviewed by Cursor Bugbot for commit 03091b1. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
|
||
| ```groovy | ||
| dependencies { | ||
| implementation 'com.mparticle:appsflyer-7:5+' |
There was a problem hiding this comment.
| implementation 'com.mparticle:appsflyer-7:5+' | |
| implementation 'com.mparticle:appsflyer-7:6+' |
| @@ -0,0 +1,51 @@ | |||
| # AppsFlyer Kit Integration | |||
|
|
|||
| This repository contains the [AppsFlyer](https://www.appsflyer.com/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk). | |||
There was a problem hiding this comment.
| This repository contains the [AppsFlyer](https://www.appsflyer.com/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk). | |
| This directory contains the [AppsFlyer](https://www.appsflyer.com/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk). |
Summary
Adds a new
appsflyer-7kit targeting AppsFlyer Android SDK 7.x, following the existing multi-major kit pattern (braze-38..41).appsflyer-6is untouched and stays pinned to[6.17.3,7.0.0), so existing v6 consumers are unaffected — v7 is opt-in.Why a new kit rather than an upgrade
AppsFlyer 7.0 is a breaking release, and it raises its own
minSdkfrom 19 to 21. Upgradingappsflyer-6in place would have broken every current consumer, including those on API 19–20.Breaking changes handled
Verified against the real
af-android-sdk6.17.3 and 7.0.1 artifacts (javapover the extractedclasses.jar) rather than the release notes:com.appsflyer.*→com.appsflyer.share.*forAppsFlyerConsent,AppsFlyerConversionListener,AFInAppEventType,AFInAppEventParameterName,deeplink.*AppsFlyerLibandAppsFlyerPropertiesdid not move.start(Context)removedstart()(2 call sites)setUserEmails(EmailsCryptType, …)and theEmailsCryptTypeenum removedsetUserEmail(String)(2 call sites)AppsFlyerConversionListenerno longer declaresonAppOpenAttribution/onAttributionFailureminSdk19 → 21Event/parameter constants (
ADD_TO_CART,PURCHASE,CONTENT_ID,REVENUE, …) and theAppsFlyerConsent4-arg constructor are unchanged, so the commerce and consent logic needed no edits.The
AppsFlyerConsentunit-test stub moved tocom/appsflyer/share/to keep shadowing the real class; theAppsFlyerLibstub stayed incom.appsflyerbecause that class did not move.Validation
appsflyer-7:testRelease— 24/24 pass against real 7.0.1appsflyer-6:testRelease— 24/24 pass (no regression)ktlintCheckon both kits — passtrunk check— no new issues; 0 issues of any kind in the new kit directoryappsflyer-7:example-kotlin:assembleDebug— APK builds; merged manifest isminSdkVersion=21and the dex containsLcom/appsflyer/share/*;, confirming v7 links end to endpublishToMavenLocal— publishes ascom.mparticle:appsflyer-7withaf-android-sdk:[7.0.0,8.0.0)at compile scope; range resolves to 7.0.1Registered in
settings-kits.gradle,settings-kit-examples.gradleandkits/matrix.json, so the kit gets its own CI job runningtestReleaseplus the example build.Reviewer notes
minSdk 21is forced by the v7 AAR, not a preference. It only affects this new opt-in module;appsflyer-6still serves API 19–20.EmailsCryptType, so the kit can no longer ask AppsFlyer to SHA256 emails. The kit was already passingEmailsCryptType.NONE(plaintext), so the value forwarded is unchanged — but the capability no longer exists.com.google.android.play:integrityis not newly introduced; it is already transitive viaappsflyer-6(6.18.1). The only genuinely new transitive iscom.appsflyer:af-android-sdk-base.🤖 Generated with Claude Code