Android Gradle plugin 9.5.0

Android Gradle plugin 9.5 is a minor release that includes a variety of new features and improvements.

Compatibility

The maximum API level that Android Gradle plugin 9.5 supports is API level 37. Here is other compatibility info:

Minimum version Default version Notes
Gradle 9.6.0 9.6.0 To learn more, see updating Gradle.
SDK Build Tools 36.0.0 36.0.0 Install or configure SDK Build Tools.
NDK N/A 28.2.13676358 Install or configure a different version of the NDK.
JDK 17 17 To learn more, see setting the JDK version.

Automated backup and restore testing

AGP 9.5.0-alpha09 adds automated backup and restore tests to help you catch missing or unusable restored data before you release. Declare a test suite in the testOptions.backupTests block. AGP then builds and runs JUnit 5 tests that add test data to your app on connected devices, back up and restore the app, and check that the data is intact. You can test local, cloud, and device-to-device transfers, and the results appear in an HTML test report. For more information, see Automated backup and restore testing and the backup and restore testing release notes.

Fixed issues

Android Gradle plugin 9.5.0-alpha09

Fixed Issues
Android Gradle Plugin
Gradle 9.8.0 reports Configuration.setVisible() deprecations with AGP 9.4.1

Android Gradle plugin 9.5.0-alpha08

Fixed Issues
Android Gradle Plugin
Warning in generateReleaseRFile task when using JDK 25
AGP 8.11+ / 9.0 blocks build due to ANDROID_PREFS_ROOT even after removal

Android Gradle plugin 9.5.0-alpha07

Fixed Issues
No public issues were marked as fixed in AGP 9.5.0-alpha07

Android Gradle plugin 9.5.0-alpha06

Fixed Issues
Android Gradle Plugin
KMP AndroidX sources are not downloaded without a separate non-KMP module
The Configuration.setVisible(boolean) method has been deprecated
AGP 9.3.0's new optimization { enable = true } DSL does not set isMinifyEnabled in the ApplicationVariant object

Android Gradle plugin 9.5.0-alpha05

Fixed Issues
No public issues were marked as fixed in AGP 9.5.0-alpha05

Android Gradle plugin 9.5.0-alpha04

Fixed Issues
Android Gradle Plugin
BouncyCastle dependency should use BOM

Android Gradle plugin 9.5.0-alpha03

Fixed Issues
Android Gradle Plugin
AGP 9.2.0 regression: `LibraryExtension.getSourceSets()` is typed on an interface the source-set implementation no longer implements, causing ClassCastException
CommonExtension.resourcePrefix has incomplete docs

Android Gradle plugin 9.5.0-alpha02

Fixed Issues
Lint
AGP's SarifReporter generates invalid JSON when LintFix has an ending alternative that produces no edits

Android Gradle plugin 9.5.0-alpha01

Fixed Issues
Android Gradle Plugin
Add a test that validate relocation does not affect task execution