build: Add Java 8 API compatibility checks#5745
Merged
Merged
Conversation
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4fc476b | 280.63 ms | 363.04 ms | 82.42 ms |
| 6b019b7 | 343.31 ms | 417.23 ms | 73.91 ms |
| 83884a0 | 334.46 ms | 400.92 ms | 66.46 ms |
| 319f256 | 315.96 ms | 372.96 ms | 57.00 ms |
| e63ad34 | 297.04 ms | 369.90 ms | 72.86 ms |
| d15471f | 322.58 ms | 396.08 ms | 73.50 ms |
| d364ace | 382.77 ms | 443.21 ms | 60.44 ms |
| 7314dbe | 437.83 ms | 505.64 ms | 67.81 ms |
| 05aa61d | 320.22 ms | 346.47 ms | 26.24 ms |
| 0eaac1e | 316.82 ms | 357.34 ms | 40.52 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4fc476b | 0 B | 0 B | 0 B |
| 6b019b7 | 0 B | 0 B | 0 B |
| 83884a0 | 1.58 MiB | 2.29 MiB | 722.97 KiB |
| 319f256 | 1.58 MiB | 2.19 MiB | 619.79 KiB |
| e63ad34 | 0 B | 0 B | 0 B |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| d364ace | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| 7314dbe | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| 05aa61d | 0 B | 0 B | 0 B |
| 0eaac1e | 1.58 MiB | 2.19 MiB | 619.17 KiB |
Previous results on branch: ci/java8-api-compatibility
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2013e56 | 310.10 ms | 352.13 ms | 42.03 ms |
| e122d12 | 360.71 ms | 433.96 ms | 73.25 ms |
| 29117d4 | 315.09 ms | 353.43 ms | 38.34 ms |
| 609df4f | 315.04 ms | 360.96 ms | 45.92 ms |
| 5e2e74b | 329.90 ms | 382.21 ms | 52.31 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2013e56 | 0 B | 0 B | 0 B |
| e122d12 | 0 B | 0 B | 0 B |
| 29117d4 | 0 B | 0 B | 0 B |
| 609df4f | 0 B | 0 B | 0 B |
| 5e2e74b | 0 B | 0 B | 0 B |
9 tasks
Member
Author
|
Tested this using #5746 and it failed for both |
3611c33 to
0229500
Compare
9 tasks
Apply Animal Sniffer to Java 8 JVM SDK modules and check them against the Codehaus Java 8 runtime signature. This catches references to newer JDK APIs while keeping the existing Android signature checks in place where they already apply. Refs GH-5741
0229500 to
305dafe
Compare
runningcode
reviewed
Jul 8, 2026
runningcode
reviewed
Jul 8, 2026
Move shared Java 8 API compatibility configuration into build-logic plugins. Apply the Android-compatible variant where modules also need gummy-bears API checks to reduce duplicated signature setup. Co-Authored-By: Claude <noreply@anthropic.com>
Move Java 8 signature coordinates into the version catalog and add a shared helper for registering Animal Sniffer signature dependencies. Co-Authored-By: Claude <noreply@anthropic.com>
runningcode
reviewed
Jul 9, 2026
runningcode
reviewed
Jul 9, 2026
Configure Animal Sniffer tasks with the plugin task type directly so ignored classes can be set without reflective method lookup. Co-Authored-By: Claude <noreply@anthropic.com>
Configure Animal Sniffer task options directly from the convention extension so the build does not defer configuration with afterEvaluate. Co-Authored-By: Claude <noreply@anthropic.com>
runningcode
reviewed
Jul 10, 2026
Move the task-wiring logic out of SentryAnimalSnifferExtension and into the plugin. The extension previously held a Project reference and reached into the animalsnifferMain task on every DSL call, mixing configuration with application logic. The extension now only declares intent via managed ListProperty values; the plugin reads them when configuring the task. This drops the Project reference (config-cache friendly) and needs no afterEvaluate, since the task-configuration action runs after the build script is evaluated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
runningcode
approved these changes
Jul 10, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
I left some comments and then did the refactor myself. Go back to the previous commit if you are curious. There's just one nit left but I'm giving it a 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Add Java 8 runtime API compatibility coverage to JVM SDK modules using Animal Sniffer and the Codehaus Java 8 signature.
This applies
ru.vyarus.animalsnifferto Java 8java-librarySDK modules that were missing it and adds:to those modules, with the signature version defined in
gradle/libs.versions.tomlasjava18Signature. Modules that already used Animal Sniffer keep their existing gummy-bears signature and also get the Codehaus Java 8 signature. The plugin checks signatures independently, so the Java 8 check still catches plain JVM incompatibilities while the existing Android/desugaring coverage remains intact.💡 Motivation and Context
We recently hit a Java 8 runtime incompatibility from a method reference that compiled on a newer JDK but is unavailable on Java 8. Targeting Java 8 bytecode is not sufficient to catch this class of issue, so published JVM SDK modules should also be checked against the Java 8 runtime API surface.
This now runs through the existing
checklifecycle and therefore through the existing Build workflow on PRs andmain.Refs GH-5741
💚 How did you test it?
The
checkrun includes Android modules and passed, confirming the duplicated JVM Animal Sniffer configuration does not break Android builds.A stacked validation PR intentionally introduces newer JDK API references in multiple JVM modules to confirm the new checks fail where expected.
📝 Checklist
sendDefaultPIIis enabled.#skip-changelog