Repository navigation
Conversation
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.
Coverage (unit tests)Compared against
Line and branch coverage from unit test reports. History is recorded on the |
Contributor
Coverage (instrumentation tests)
|
This branch has not been deployed
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
gradle.propertiescarries 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=falseandroid.defaults.buildfeatures.resvalues=trueandroid.sdk.defaultTargetSdkToCompileSdkIfUnset=falseandroid.usesSdkInManifest.disallowed=falseandroid.dependency.useConstraints=trueandroid.r8.strictFullModeForKeepRules=false,android.r8.optimizedResourceShrinking=falseKept:
android.uniquePackageNames=false: without itmaps-appfails the manifest merge, because it uses the same namespace asmaps-compose(com.google.maps.android.compose). The real fix is to give the demo its own namespace, which I would do in a follow-up; I added a comment so it is not forgotten.android.enableJetifier=true: the comment above it says it is needed for the Navigation SDK, and feat: support custom MapView delegates and add Navigation SDK sample app #1061 adds the Navigation SDK sample. The build passes without it onmain, so we can remove it once feat: support custom MapView delegates and add Navigation SDK sample app #1061 is in and we check it there.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-appare minified. The R class flags would only matter for resources, andmaps-composeships one resource whilemaps-compose-utilsandmaps-compose-widgetsship none.Testing
From a clean build, with the flags removed:
./gradlew build koverXmlReportDebug(compile, unit tests and lint, same as CI)assembleDebugAndroidTestfor the four modules:maps-app:validateDebugScreenshotTest, so no screenshot changed:maps-app:assembleReleaseThe emulator suites run in CI on this PR.