Skip to content

chore: restore apiCheck for Android library modules - #3506

Merged
mattcreaser merged 1 commit into
mainfrom
mattcreaser/restore-android-api-check
Oct 28, 2026
Merged

mattcreaser merged 1 commit into
mainfrom
mattcreaser/restore-android-api-check

Conversation

@mattcreaser

@mattcreaser mattcreaser commented Oct 27, 2026 •

Copy link
Copy Markdown
Member
  • PR title and description conform to Pull Request guidelines.

Issue #, if available:

Description of changes:
API validation was broken for all modules except foundation by the AGP update in #3465, since AGP 9 no longer allows kotlin-android which is required for the Binary Compatibility Validator (BCV). With newer versions of Kotlin the expected replacement for BCV is to use ABI validation built into the Kotlin plugin, but this does not yet support Android modules at all.

This PR manually re-wires BCV back into the build while keeping AGP 9. The expectation is that this is a temporary workaround until Kotlin ABI Validation is updated to support Android projects.

How did you test these changes?
(Please add a line here how the changes were tested)

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Ensure commit message has the appropriate scope (e.g fix(storage): message, feat(auth): message, chore(all): message)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mattcreaser
mattcreaser requested a review from a team as a code owner October 27, 2026 16:59
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.80%. Comparing base (a7721de) to head (602424d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3506      +/-   ##
==========================================
- Coverage   57.81%   57.80%   -0.02%     
==========================================
  Files        1129     1129              
  Lines       33281    33281              
  Branches     4965     4965              
==========================================
- Hits        19241    19237       -4     
- Misses      12112    12116       +4     
  Partials     1928     1928              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ekjotmultani
ekjotmultani previously approved these changes Oct 27, 2026
Comment thread build-logic/plugins/src/main/kotlin/ApiValidatorConventionPlugin.kt Outdated
The binary compatibility validator registers its api tasks only for
projects that apply a Kotlin plugin of their own. Android modules take
Kotlin from AGP instead as of AGP 9, so since #3465 they have had no
apiCheck or apiDump at all and the dumps in their api directories went
unvalidated — the apiCheck step in PR verification was covering
foundation alone, 1 module out of 32.

Drive the validator's own task types off the release variant's compiled
classes so every Android library module gets apiBuild, apiCheck and
apiDump back, with apiCheck wired into check. The validator puts ASM on
the classpath its worker runs on but adds the metadata reader that
determines Kotlin visibility only for projects applying a Kotlin plugin,
so that dependency is declared here too.

All 31 restored modules pass byte-identical against the dumps their
previous apiDump runs produced, so the task wiring reproduces the
validator's own output rather than an approximation of it.

Also drops an unused import and a suppression in the Android library
convention plugin, both left behind by #3465 removing the delegated
property reads they existed for.
@mattcreaser
mattcreaser enabled auto-merge (squash) October 28, 2026 14:44
@mattcreaser
mattcreaser merged commit b8fb11a into main Oct 28, 2026
14 of 21 checks passed
@mattcreaser
mattcreaser deleted the mattcreaser/restore-android-api-check branch October 28, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants