Repository navigation
ci: report binary compatibility against the last published release - #849
nickolas-dimitrakas wants to merge 1 commit into
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": 2513, "baseline_install_bytes": 7528, "core_dex_bytes": 218884, "core_download_bytes": 122935, "core_install_bytes": 130187}This PR: {"baseline_dex_bytes": 0, "baseline_download_bytes": 2515, "baseline_install_bytes": 7531, "core_dex_bytes": 218884, "core_download_bytes": 122938, "core_install_bytes": 130191} |
a36da06 to
3819f09
Compare
PR SummaryLow Risk Overview The change introduces Reviewed by Cursor Bugbot for commit b620b9b. Bugbot is set up for automated code reviews on this repo. Configure here. |
4732c7e to
32bbfbf
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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.
Reviewed by Cursor Bugbot for commit 32bbfbf. Configure here.
| distribution: "zulu" | ||
| java-version: "17" | ||
| - name: "Setup Gradle" | ||
| uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 |
There was a problem hiding this comment.
Gradle setup action pinned to older version
Low Severity
The new binary-compatibility job pins gradle/actions/setup-gradle to v6.3.0 (@9c971963b...), while every other job in this file and across all other workflow files consistently uses v6.4.0 (@3f5f9adaf...). This version inconsistency could lead to different Gradle caching behavior or miss bug fixes present in the version the rest of the CI relies on.
Reviewed by Cursor Bugbot for commit 32bbfbf. Configure here.
5f9abed to
81d306f
Compare
| - name: "Test the comparison script" | ||
| run: python3 -m unittest scripts/test_api_compat_report.py | ||
| - name: "Compare release artifacts with the last published release" | ||
| run: python3 scripts/api_compat_report.py --output-dir build/api-compat |
There was a problem hiding this comment.
Would it fail the build if the compatibility is not matched?
81d306f to
1e14a65
Compare
Adds a Binary Compatibility job that builds the release AARs of android-core and android-kit-base, downloads the same artifacts at the latest version on Maven Central, and runs japicmp over them. android-core ships R8-minified, so R8-renamed classes are dropped from both sides and, inside the few classes the R8 mapping file shows to be only partially kept, R8-renamed members are ignored; every member of a fully kept class is compared by its real name. Any remaining binary- or source-incompatible change fails the job. The job is not in the required-check set. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1e14a65 to
b620b9b
Compare


Summary
Adds a CI job, Binary Compatibility, that compares the release artifacts of
android-coreandandroid-kit-baseagainst the most recent version published to Maven Central and fails on any binary- or source-incompatible change.scripts/api_compat_report.pybuilds both release AARs, extractsclasses.jarfrom each, downloads the same artifact at the latest published version (verified against its published checksum), and runs japicmp 0.26.2 (pinned by version and SHA-256). Additions are reported but do not fail the run.android-coreships R8-minified, so R8-renamed symbols are excluded before the verdict is computed. Classes whose simple name, or any nested-class segment of it, is R8-shaped (a,b1,MParticle$a,Outer$1) are dropped from both jars. Members are filtered only on evidence: the release build's R8 mapping file identifies the classes that a keep rule names only partially (todayConfigManager,MParticleIdentityClientImpland the Kotlinaccess$synthetics ofInternalListenerManager), and only inside those classes are R8-shaped member names ignored. Every member of a fully kept class is compared by its real name, so removing a short-named public field such asMPUtility.AdIdInfo.idis reported.scripts/test_api_compat_report.py(standard-libraryunittest) covers the class filter, the mapping parser and the report evaluation; CI runs it before the comparison.api-compat-reportsworkflow artifact; a one-line result goes to the job summary.AGENTS.md.The job is deliberately not in the required-check set. It runs on every pull request and on pushes to
main.Why
./gradlew apiCheck(#843) guards the compiled surface before R8. What consumers link against is the post-R8 artifact, in which only the classesandroid-core/proguard.prokeeps survive under their own names. This job is the check on the artifact that ships, and it also seesthrowsclauses and nullability annotations. japicmp runs with--ignore-missing-classesand no external classpath, so changes that only manifest through unresolved external supertypes are left to the compile-time dump.Verification
android-core115 named classes compared (180 R8-renamed dropped on each side),android-kit-base44 compared; no changes.android-coreagainst 6.0.0: compatible; five classes with additions only. The R8-renamed members that a name-shape filter would have mis-reported are correctly ignored.AttributionErrorfrom the local AAR reportsCLASS_REMOVEDand each of its members, exit code 2.🤖 Generated with Claude Code