Skip to content

chore: remove legacy AGP opt-out flags from gradle.properties - #1065

Open
kikoso wants to merge 1 commit into
mainfrom
chore/remove-legacy-agp-flags
Open

kikoso wants to merge 1 commit into
mainfrom
chore/remove-legacy-agp-flags

Conversation

@kikoso

@kikoso kikoso commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

gradle.properties carries a set of opt-out flags that keep pre-AGP 9 behaviour. The build already warns that AGP 10 starts removing them, so it is easier to drop them now, one PR, than to be forced to during the AGP 10 upgrade.

Removed:

  • android.nonTransitiveRClass=false, android.nonFinalResIds=false, android.enableAppCompileTimeRClass=false
  • android.defaults.buildfeatures.resvalues=true
  • android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
  • android.usesSdkInManifest.disallowed=false
  • android.dependency.useConstraints=true
  • android.r8.strictFullModeForKeepRules=false, android.r8.optimizedResourceShrinking=false

Kept:

Impact

None for apps using the libraries: these properties only change how this repository is built, not the published artifacts. The R8 and resource shrinking flags only apply to minified builds, and neither the libraries nor maps-app are minified. The R class flags would only matter for resources, and maps-compose ships one resource while maps-compose-utils and maps-compose-widgets ship none.

Testing

From a clean build, with the flags removed:

  • ./gradlew build koverXmlReportDebug (compile, unit tests and lint, same as CI)
  • assembleDebugAndroidTest for the four modules
  • :maps-app:validateDebugScreenshotTest, so no screenshot changed
  • :maps-app:assembleRelease

The emulator suites run in CI on this PR.

These properties kept pre-AGP 9 behaviour and AGP 10 starts removing them.
The build, unit tests, lint, instrumentation test compilation and screenshot
validation pass without them. uniquePackageNames stays until maps-app has its
own namespace, and enableJetifier stays for the Navigation SDK sample.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Coverage (unit tests)

Compared against 174f0fd on main (#1060).

Module Line % Change Branch % Change
maps-compose 15.28% no change 3.76% no change
maps-compose-utils 6.09% no change 4.47% no change
maps-compose-widgets 10.88% no change 11.11% no change
TOTAL 12.99% no change 4.12% no change

Line and branch coverage from unit test reports. History is recorded on the coverage-history branch after each merge to main.

@kikoso
kikoso marked this pull request as ready for review November 3, 2026 05:59
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Coverage (instrumentation tests)

Overall Project 43.69% 🍏

There is no coverage information present for the Files changed

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants