Upgrade to Android Gradle Plugin 9.1.0#2318
Open
greg7gkb wants to merge 1 commit intocashapp:masterfrom
Open
Conversation
45632b6 to
a7d377e
Compare
- Bump agp to 9.1.0, androidTools to 32.1.0
- Fix CommonExtension usage: no longer takes type parameters in AGP 9
- Propagate ANDROID_HOME to paparazzi-preview-lints test sub-builds;
AGP 9 requires local.properties for SDK location, env var alone is
not sufficient in nested builds
- Remove ~89 explicit kotlin-android plugin declarations from fixture
build files; AGP 9 defaults android.builtInKotlin=true, which
auto-applies Kotlin and makes the explicit plugin redundant
- Remove kotlinOptions { jvmTarget } blocks from fixture build files;
jvmTarget already defaults from compileOptions.targetCompatibility
- Migrate report-snapshots fixture from android { kotlinOptions {} }
to top-level kotlin { compilerOptions {} }; AGP 9 defaults
android.newDsl=true which no longer supports kotlinOptions inside
android {}
- Remove android.builtInKotlin=false and android.newDsl=false compat
flags from root gradle.properties and applicable fixture properties
- Add android.onlyEnableUnitTestForTheTestedBuildType=false to
generated fixture gradle.properties; AGP 9 defaults this to true,
restricting unit tests to the debug variant only
- Remove build/generated/res/resValues/debug from 4 test assertions;
AGP 9 omits this path from variant.sources.res.all when no resValues
are configured
- Add test verifying resValues path is present when explicitly
configured (buildFeatures.resValues=true required in AGP 9)
- Retain android.builtInKotlin=false in multiplatform-plugin-with-android
and multiplatform-plugin-without-android fixtures; AGP 9 explicitly
blocks com.android.library + kotlin.multiplatform with builtInKotlin=true
This was referenced Apr 11, 2026
Author
|
@eboudrant as you wish 😊 |
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.
Summary
Upgrades AGP from 8.13.2 → 9.1.0 and removes all AGP 8 compatibility shims, leaving the project fully compliant with AGP 9 defaults.
What changed
libs.versions.toml—agp = "9.1.0",androidTools = "32.1.0"PaparazziPlugin.kt—CommonExtensionno longer takes type parameters in AGP 9paparazzi-preview-lints/build.gradle— propagateANDROID_HOMEto test sub-builds; AGP 9 requireslocal.propertiesfor SDK location, env var alone is not sufficient in nested buildsid 'kotlin-android'andkotlinOptions { jvmTarget }blocks; AGP 9 defaultsandroid.builtInKotlin=true, which auto-applies Kotlin and makes the explicit plugin redundant;jvmTargetis already implied bycompileOptions.targetCompatibilityreport-snapshots/build.gradle— migratedandroid { kotlinOptions {} }to top-levelkotlin { compilerOptions {} }; AGP 9 defaultsandroid.newDsl=true, which no longer supportskotlinOptionsinsideandroid {}gradle.properties(root) + 5 fixturegradle.propertiesfiles — removedandroid.builtInKotlin=falseandandroid.newDsl=falsecompat flagsPaparazziPluginTest.kt— addedandroid.onlyEnableUnitTestForTheTestedBuildType=falseto generated fixture properties (AGP 9 defaults this totrue, restricting unit tests to debug-only); removedbuild/generated/res/resValues/debugfrom 4 assertions (AGP 9 omits this path when noresValuesare configured); added new test verifying the path is present whenresValuesare explicitly configured (buildFeatures.resValues=trueis also required explicitly in AGP 9)Intentional carve-outs:
multiplatform-plugin-with-androidandmultiplatform-plugin-without-androidfixtures retainandroid.builtInKotlin=falseandandroid.newDsl=false— AGP 9 explicitly blocks thecom.android.library + kotlin.multiplatformcombination withbuiltInKotlin=true. These fixtures specifically test the legacy KMP path.Test plan
./gradlew buildpasses (91 tests, 0 failures)./gradlew :sample:testDebugpasses