Skip to content

refactor(demo): move maps-app to its own namespace - #1066

Merged
dkhawk merged 2 commits into
chore/remove-legacy-agp-flagsfrom
refactor/demo-namespace
Nov 5, 2026
Merged

dkhawk merged 2 commits into
chore/remove-legacy-agp-flagsfrom
refactor/demo-namespace

Conversation

@kikoso

@kikoso kikoso commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Stack

Summary

maps-app uses com.google.maps.android.compose both as namespace and as root package, the same as maps-compose. AGP 9 rejects two modules with the same namespace, and we only build today because of android.uniquePackageNames=false, the last legacy flag left after #1065. This moves the demo app to com.google.maps.android.compose.demo and removes the flag.

  • namespace is now com.google.maps.android.compose.demo. The applicationId stays com.google.maps.android.compose, so the installed app, the CI workflows and the smoke tests keep targeting the same package.
  • All the maps-app sources move to ...compose.demo (main, test, androidTest, screenshotTest) together with the screenshot reference images. Git sees them as renames, so the history is kept.
  • Sharing the package with the library meant the demo used GoogleMap, Marker, rememberCameraPositionState and friends without imports. They are now imported explicitly (no wildcards). A few files import both the Play services class and the composable with the same name (GoogleMap, Marker); Kotlin picks the right one from the call, same as before.
  • Updated the smoke test package in demo-smoke-test.yml and instrumentation-test.yml, the installAndLaunch task, AGENTS.md and the README/docs links to the demo sources.

No change for the published libraries: only maps-app and the build configuration are touched.

This also helps #1063: the demo classes will not share a package with maps-compose anymore, so the baseline profile filter becomes much simpler. Whichever of the two merges second needs a small update (the demo activity names in BaselineProfileGenerator gain the demo. prefix).

Testing

  • ./gradlew build koverXmlReportDebug (compile, unit tests, lint) passes.
  • assembleDebugAndroidTest for maps-app and maps-compose-widgets, :maps-app:validateDebugScreenshotTest (same reference images, moved) and :maps-app:assembleRelease pass.
  • spotlessKotlinCheck is clean for the changed files (the "could not resolve all violations" warning on MarkerClusteringActivity.kt is already on main).
  • The emulator suites, including the demo smoke test with the new package filter, run in CI on this PR.

maps-app used com.google.maps.android.compose, the same namespace and root
package as maps-compose, which AGP 9 only allows with
android.uniquePackageNames=false. Move the demo app, its tests and screenshot
references to com.google.maps.android.compose.demo, add the explicit imports of
the library classes it used implicitly through the shared package, and remove
the flag. The applicationId stays com.google.maps.android.compose.
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Coverage (unit tests)

Compared against d8d77e9 on chore/remove-legacy-agp-flags (#1076).

Module Line % Change Branch % Change
maps-compose 15.27% no change 3.76% no change
maps-compose-utils 6.12% no change 4.39% no change
maps-compose-widgets 10.88% no change 11.11% no change
TOTAL 12.99% no change 4.11% no change

Line and branch coverage from unit test reports. History is recorded on the coverage-history branch after each merge to chore/remove-legacy-agp-flags.

@kikoso
kikoso marked this pull request as ready for review November 3, 2026 05:59
@kikoso
kikoso requested a review from a team as a code owner November 3, 2026 05:59
@googlemaps-bot

googlemaps-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

@dkhawk
dkhawk added this pull request to stack #1079 November 5, 2026 19:27
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