feat: split LogoutListener from AttributeListener#685
feat: split LogoutListener from AttributeListener#685denischilik wants to merge 10 commits intoworkstation/6.0-Releasefrom
Conversation
Introduce KitIntegration.LogoutListener for logout handling; AttributeListener no longer extends it. KitManagerImpl calls logout() on LogoutListener only. Embedded kits that implement AttributeListener now explicitly implement LogoutListener; AttributeListenerTestKit updated accordingly.
PR SummaryMedium Risk Overview Updates embedded kits/tests to match the new contract. Kits that previously relied on Stabilizes kit CI builds against local published artifacts. Workflows now publish/use a Written by Cursor Bugbot for commit 48c71fe. This will update automatically on new commits. Configure here. |
Kotlin CI failed resolving import com.mparticle.kits.KitIntegration.LogoutListener for Java nested interfaces; use KitIntegration.LogoutListener in implements lists. Made-with: Cursor
| EventListener, | ||
| CommerceListener, | ||
| AttributeListener, | ||
| KitIntegration.LogoutListener, |
There was a problem hiding this comment.
Would be nice to import the class and use just.
| KitIntegration.LogoutListener, | |
| LogoutListener, |
There was a problem hiding this comment.
Our Kotlin builds failed on CI with Unresolved reference 'LogoutListener' when we used import com.mparticle.kits.KitIntegration.LogoutListener
There was a problem hiding this comment.
Looks like kits during tests were using released version and it was original reason for failure
There was a problem hiding this comment.
Yes, when the repos were separate, the core will be published first and the kits will consume it to get the updates in interfaces and contracts.
That need to be changed in new flow.
Ensures settings-kits.gradle resolves android-kit-base from the same version published to mavenLocal, not the latest from Maven Central. Made-with: Cursor
Use import com.mparticle.kits.KitIntegration.LogoutListener and LogoutListener in kit implementations and KitManagerImpl instead of qualified KitIntegration.LogoutListener. Made-with: Cursor
KitPlugin resolves android-kit-base via VERSION; isolated UA runs from a subproject previously omitted -PVERSION and fell back to '+' (Central). Run from repo root with -p and -PVERSION aligned with VERSION file. Made-with: Cursor
Export VERSION from VERSION file to GITHUB_ENV so Gradle resolves the same project property without repeating -PVERSION on every command. Made-with: Cursor
- Append -ci to ORG_GRADLE_PROJECT_VERSION so kit resolution cannot match an already-published Central artifact for the same semver. - Run publish + kit + urbanairship in one run block with export so every Gradle invocation shares the same VERSION property. Made-with: Cursor
Revert merging multiple kit Gradle commands into a single run block. Keep ORG_GRADLE_PROJECT_VERSION=$(head -n 1 VERSION)-ci so kits resolve local maven artifacts that do not exist on Central. Made-with: Cursor
GITHUB_ENV ORG_GRADLE_PROJECT_VERSION was not reliably applied when using settings-kits.gradle; KitPlugin then fell back to '+' and resolved android-kit-base from Maven Central. Pass -PVERSION=...-ci on each publish, lint, ktlint, test, and urbanairship invocation. Made-with: Cursor
5d009a2 to
4848718
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| val dBlob = dBlob | ||
| val dcsRegion = dcsRegion | ||
| val userIdentities = | ||
| MParticle.getInstance()?.Identity()?.getCurrentUser()?.getUserIdentities() ?: emptyMap() |
There was a problem hiding this comment.
Unfiltered user identities sent to Adobe kit
High Severity
The newly added userIdentities variable fetches identities via MParticle.getInstance()?.Identity()?.getCurrentUser()?.getUserIdentities(), which returns unfiltered identities from the raw MParticleUser. The KitIntegration base class provides getCurrentUser() which returns a FilteredMParticleUser — its getUserIdentities() applies both data plan filtering and kit configuration filtering (via shouldSetIdentity). Using the unfiltered path bypasses these controls and may send identity types to Adobe that the dashboard configuration has explicitly blocked.
48c71fe to
4848718
Compare
|




Summary
KitIntegration.LogoutListeneras a separate contract from the deprecatedAttributeListener.KitManagerImpl.logout()invokeslogout()only on kits that implementLogoutListener.AttributeListenernow explicitly implementLogoutListeneras well.AttributeListenerTestKitimplements both interfaces for instrumented tests.