build: Bump AGP to 9.2.1 and migrate Android modules#5779
Merged
Conversation
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
July 16, 2026 17:01
📲 Install BuildsAndroid
|
runningcode
force-pushed
the
no/java-649-bump-agp-920
branch
2 times, most recently
from
July 17, 2026 08:30
eaea270 to
aed7d88
Compare
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b193867 | 331.08 ms | 397.06 ms | 65.98 ms |
| 3d205d0 | 352.15 ms | 432.53 ms | 80.38 ms |
| 22ff2c7 | 306.60 ms | 336.65 ms | 30.05 ms |
| a5ab36f | 320.47 ms | 389.77 ms | 69.30 ms |
| 539ca63 | 313.51 ms | 355.43 ms | 41.92 ms |
| dba088c | 365.46 ms | 366.31 ms | 0.85 ms |
| 4e3e79d | 312.02 ms | 376.24 ms | 64.22 ms |
| 7314dbe | 437.83 ms | 505.64 ms | 67.81 ms |
| ad8da22 | 314.38 ms | 352.29 ms | 37.91 ms |
| bb0ff41 | 344.70 ms | 413.82 ms | 69.12 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b193867 | 1.58 MiB | 2.19 MiB | 620.00 KiB |
| 3d205d0 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
| 22ff2c7 | 0 B | 0 B | 0 B |
| a5ab36f | 1.58 MiB | 2.12 MiB | 555.26 KiB |
| 539ca63 | 1.58 MiB | 2.12 MiB | 551.41 KiB |
| dba088c | 1.58 MiB | 2.13 MiB | 558.99 KiB |
| 4e3e79d | 0 B | 0 B | 0 B |
| 7314dbe | 1.58 MiB | 2.10 MiB | 533.45 KiB |
| ad8da22 | 1.58 MiB | 2.29 MiB | 719.83 KiB |
| bb0ff41 | 0 B | 0 B | 0 B |
runningcode
force-pushed
the
no/java-649-bump-agp-920
branch
2 times, most recently
from
July 17, 2026 11:13
7a60384 to
7d0c248
Compare
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, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7d0c248. Configure here.
Raise the minimum AGP to 9.0.0 (default fallback 9.2.1) and perform the AGP 9 migration: refresh the AGP-compat matrix (9.0.0/9.1.1/9.2.1), add the AGP 9 opt-outs (android.builtInKotlin/newDsl, lint 9.2.1), pin Java and Kotlin targets to 8 across the Android library modules, set testBuildType to release for unit tests (including sentry-compose), bump the uitest modules to JVM 11, and resolve the AGP 9.2 lint findings. Robolectric 4.15 caps at API 35, so pin the affected tests with @config(sdk = [35]) to keep them green against targetSdk 36. lint 9.2.1 flags compileSdk 36 as outdated (37 is available); disable GradleDependency for the Android modules since the SDK bump lives in the API 37 PR. Split out from the API 37 bump (#5768) so the toolchain upgrade lands on its own. compileSdk/targetSdk stay at 36 here. Co-authored-by: Adam Brown <adam.brown@sentry.io> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EmE8hdaj9H9K61opK2PZ6U
runningcode
force-pushed
the
no/java-649-bump-agp-920
branch
from
July 17, 2026 11:24
7d0c248 to
fb2e3e2
Compare
runningcode
commented
Jul 17, 2026
runningcode
commented
Jul 17, 2026
Contributor
Author
|
I'm guessing the failing snapshot test diff is due to a bump in layoutlib which mustve changed the default theme from dark to light: https://github.com/getsentry/sentry-java/pull/5779/checks?check_run_id=87875970201 I went ahead and approved it. I don't think it is worth investigating |
romtsn
reviewed
Jul 21, 2026
romtsn
approved these changes
Jul 21, 2026
romtsn
left a comment
Member
There was a problem hiding this comment.
one question and one comment, but unblocking ✅
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.

We need to bump AGP to 9.2 because compile SDK introduced a breaking change (
37.0vs37) which makes it very difficult to compile using AGP 8.X.AGP 9.X introduced several breaking changes that we try to mitigate in this PR.
android.builtInKotlin=falseandroid.builtInKotlin=falseFixes #5777
Linear: #5777 (#5777)
#skip-changelog
🤖 Generated with Claude Code
https://claude.ai/code/session_01EmE8hdaj9H9K61opK2PZ6U