Repository navigation
build: add public API dumps with binary-compatibility-validator - #843
Conversation
📦 SDK Size Impact ReportWhat the SDK adds to a minified release APK. Measured against an empty baseline app. Unlike the Rokt kit, android-core ships no Compose and no resources, so there is nothing here that a host app would already provide. mParticle Core SDK
➡️ SDK size impact change is minimal. Raw measurementsTarget branch: {"baseline_dex_bytes": 0, "baseline_download_bytes": 2509, "baseline_install_bytes": 7523, "core_dex_bytes": 218884, "core_download_bytes": 122934, "core_install_bytes": 130185}This PR: {"baseline_dex_bytes": 0, "baseline_download_bytes": 2514, "baseline_install_bytes": 7530, "core_dex_bytes": 218884, "core_download_bytes": 122941, "core_install_bytes": 130194} |
📦 SDK Size Impact ReportWhat the SDK adds to a minified release APK. Measured against a Compose + Material3 reference app, so these are the costs on top of an app that already ships Compose. The reference app's dependencies are a documented convention, not a measured average: see mParticle Core + Rokt kit
Rokt SDK+ umbrella (adds the payment extension)
➡️ SDK size impact change is minimal. Raw measurementsTarget branch: {"baseline_dex_bytes": 1829108, "baseline_download_bytes": 1240062, "baseline_install_bytes": 1300934, "kit_dex_bytes": 4156052, "kit_download_bytes": 2540334, "kit_install_bytes": 2623275, "sdkplus_dex_bytes": 9278708, "sdkplus_download_bytes": 7978468, "sdkplus_install_bytes": 8148975}This PR: {"baseline_dex_bytes": 1829108, "baseline_download_bytes": 1240062, "baseline_install_bytes": 1300934, "kit_dex_bytes": 4156052, "kit_download_bytes": 2540336, "kit_install_bytes": 2623275, "sdkplus_dex_bytes": 9278708, "sdkplus_download_bytes": 7978465, "sdkplus_install_bytes": 8148975} |
d24c30a to
29c65d1
Compare
PR SummaryLow Risk Overview Adds baseline API signature dumps and integrates validation into the CI pull request workflow via Reviewed by Cursor Bugbot for commit 1d39db4. Bugbot is set up for automated code reviews on this repo. Configure here. |
29c65d1 to
507b6e6
Compare
008250e to
c08882b
Compare
c08882b to
4ea3008
Compare
Applies kotlinx binary-compatibility-validator to android-core and android-kit-base and commits the generated API dumps. `./gradlew apiCheck` now runs in the Unit Tests job and fails when the compiled public surface differs from the committed dump, so every change to the surface is visible in the pull request diff. A small classifier marks changes to frozen contracts: any class outside com.mparticle.internal, plus the internal classes that kits compile against or that android-core/proguard.pro names. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4ea3008 to
1d39db4
Compare
Summary
Adds a committed, reviewable record of the public API surface of
android-coreandandroid-kit-base, and a check that fails when a change moves it.android-core/api/android-core.api,android-kit-base/api/android-kit-base.api).BuildConfigis ignored; members annotated@RestrictToare treated as non-public../gradlew apiCheckin the existing Unit Tests job, so a signature change fails the build until the dump is regenerated with./gradlew apiDumpand the diff is part of the pull request.scripts/check_api_dump.py, which compares the dumps against the base branch and classifies each changed class. A change to any class outsidecom.mparticle.internal, or to an internal class listed inscripts/api-frozen-internals.txt(classes kits import, classes resolved by name, classes named inproguard.pro), fails the job. Other internal changes are reported for review. The step is skipped when the pull request carries theapi-change-approvedlabel, the path for an intentional, reviewed API change; because the workflow does not run on label events, push a commit (or rebase) after labelling to re-run it.AGENTS.md.No source or artifact changes. The dumps describe the compiled surface as it is on
maintoday.Why
The dump is the baseline for upcoming internal refactoring: it makes every accidental change to the compiled surface (a class or method becoming
final, a static moving, an overload appearing) visible in review before it can ship.Verification
./gradlew apiDumponmainproduces 3,541 declarations for core and 499 for kit-base;./gradlew apiCheckpasses../gradlew ktlintCheckpasses.AttributionErrorin the dump exits 2 (frozen); adding a method tointernal.UserStorageexits 0 with a reviewable report; a base without dumps is treated as baseline creation and exits 0.Follow-up
The
api-change-approvedlabel does not exist yet and needs to be created in the repository settings.🤖 Generated with Claude Code