Skip to content

build(android): Bump AGP to 9.5.1 - #6540

Merged
runningcode merged 1 commit into
mainfrom
no/bump-agp-9.5.1
Nov 11, 2026
Merged

runningcode merged 1 commit into
mainfrom
no/bump-agp-9.5.1

Conversation

@runningcode

@runningcode runningcode commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Bumps the default Android Gradle Plugin from 9.4.0 to 9.5.1, the latest stable release. It also bumps the matrix version so we now test 9.0, 9.4, and 9.5.1.

Lint 9.5 reports two new findings:

  • ObsoleteLintCustomCheck in a few modules. The issue is that Lint 9.5 can't load the custom checks in the lint.jar that androidx.lifecycle bundles (seen with 2.3.1, 2.8.7 and 2.9.0), so it skips them and says so. We'll fix this in a follow up on the v9 branch once we merge there: https://linear.app/getsentry/issue/JAVA-832/bump-androidxlifecycle-to-2100-and-re-enable-obsoletelintcustomcheck
  • ThreadConstraint, flags ScreenshotUtils.takeScreenshot. It infers a UI-thread requirement from the View calls in captureScreenshot, and that conflicts with Bitmap.compress's @WorkerThread. The method is safe to call from any thread because captureScreenshot posts the view draw to the UI thread when it isn't already on it, so the check is suppressed on that method only. Hybrid SDKs call this method; its behavior doesn't change.

This replaces the Dependabot bump #6505, which only touched the version catalog and fails on these lint errors.

💡 Motivation and Context

Keep the toolchain on the current stable AGP.

💚 How did you test it?

Passes CI

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

#skip-changelog

🤖 Generated with Claude Code

Raise the default Android Gradle Plugin from 9.4.0 to 9.5.1, the latest
stable release. The AGP matrix moves to 9.0.0/9.4.0/9.5.1, keeping the
minimum supported version and the previous default, and the replay
snapshot upload follows the new default.

Lint 9.5 can't load the custom checks bundled with older
androidx.lifecycle releases and reports ObsoleteLintCustomCheck, which
warningsAsErrors fails on. Disable it in the affected modules; the
skipped checks cover lifecycle APIs those modules don't call.

Lint 9.5's new ThreadConstraint check flags
ScreenshotUtils.takeScreenshot, which is safe to call from any thread
because captureScreenshot posts the view draw to the UI thread. Suppress
it there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sentry

sentry Bot commented Nov 10, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode marked this pull request as ready for review November 10, 2026 14:31
@runningcode
runningcode requested review from a team and adinauer as code owners November 10, 2026 14:31
@runningcode
runningcode requested review from 0xadam-brown and markushi and removed request for a team November 10, 2026 14:31
@runningcode runningcode added the ship-it PR is ready to merge from a reviewer perspective label Nov 10, 2026
@runningcode
runningcode merged commit 842b197 into main Nov 11, 2026
51 checks passed
@runningcode
runningcode deleted the no/bump-agp-9.5.1 branch November 11, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants