feat: split LogoutListener from AttributeListener#685
feat: split LogoutListener from AttributeListener#685denischilik merged 22 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 Embedded kits and tests are updated to match the new contract. Kits that previously relied on CI and kit build plumbing is tightened for version/repo resolution. Workflows export Written by Cursor Bugbot for commit 161aae1. 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
kits/branch/branch-5/src/main/kotlin/com/mparticle/kits/BranchMetricsKit.kt
Outdated
Show resolved
Hide resolved
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
5d009a2 to
4848718
Compare
kits/adobe/adobe-5/src/main/kotlin/com/mparticle/kits/AdobeKitBase.kt
Outdated
Show resolved
Hide resolved
4848718 to
e7d3b44
Compare
Add optional exclusiveContent in KitPlugin so com.mparticle artifacts (android-kit-base, android-kit-plugin) resolve only from mavenLocal when -Pmparticle.kit.mparticleFromMavenLocalOnly=true or MPARTICLE_KIT_FROM_MAVEN_LOCAL_ONLY. Enable the flag in PR and daily workflows after publishMavenPublicationToMavenLocal so kit lint and tests use freshly published local artifacts, not Maven Central. Made-with: Cursor
Kit subprojects may not see ORG_GRADLE_PROJECT_VERSION / VERSION; falling back to rootProject avoids '+' and matches publishMavenPublicationToMavenLocal. Made-with: Cursor
Ensure kit lint and test jobs pass VERSION explicitly so settings-kits builds resolve the locally published android-kit-base/android-core artifacts instead of drifting to a mismatched version. Made-with: Cursor
…ence Use forRepository(repositories.mavenLocal()) in exclusiveContent so the kit plugin configures repositories correctly when mparticleFromMavenLocalOnly is enabled. Made-with: Cursor
…tion Replace exclusiveContent with repository content filters so com.mparticle resolves only from mavenLocal while avoiding DSL incompatibilities in Gradle 8.5 Groovy builds. Made-with: Cursor
Replace removed KitIntegration userIdentities access with currentUser.userIdentities when building Adobe audience sync parameters. Made-with: Cursor
Replace removed KitIntegration userIdentities access with currentUser.userIdentities when generating Leanplum user IDs. Made-with: Cursor
Pass VERSION and mparticleFromMavenLocalOnly to isolated urbanairship lint/ktlint/test jobs so they resolve android-kit-base/android-core from local Maven artifacts consistently. Made-with: Cursor
Remove preconfigured project repositories before applying local-only filters so com.mparticle artifacts cannot resolve from unfiltered root repositories when mparticleFromMavenLocalOnly is enabled. Made-with: Cursor
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.
kits/adobe/adobe-5/src/main/kotlin/com/mparticle/kits/AdobeKitBase.kt
Outdated
Show resolved
Hide resolved
Replace KitIntegration.AttributeListener references in class inheritance clauses with imported AttributeListener for consistency with other listener types. Made-with: Cursor
Use a safe-call when reading currentUser.userIdentities during ID sync to avoid NPE when no current user is available. Made-with: Cursor
Keep mparticle exclusion only on Maven Central and use the default google repository configuration since com.mparticle artifacts are not published there. Made-with: Cursor
Drop unused KitIntegration import in AttributeListenerTestKit to satisfy ktlint androidTest checks. Made-with: Cursor
Export both Gradle VERSION/version properties via GITHUB_ENV and remove redundant -Pversion CLI overrides from kit-related workflow commands. Made-with: Cursor
|
| import org.json.JSONObject | ||
| import java.math.BigDecimal | ||
| import java.util.LinkedList | ||
| import com.mparticle.kits.KitIntegration.AttributeListener |
There was a problem hiding this comment.
This will trigger lint errors since the imports are not sorted. Something we can fix when the lint is unified across all the kits.



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.