Skip to content

feat: migrate android-maps-ktx into android-maps-utils (v6.0.0-rc01)#1716

Draft
dkhawk wants to merge 87 commits into
mainfrom
feat/migrate-ktx-to-utils
Draft

feat: migrate android-maps-ktx into android-maps-utils (v6.0.0-rc01)#1716
dkhawk wants to merge 87 commits into
mainfrom
feat/migrate-ktx-to-utils

Conversation

@dkhawk

@dkhawk dkhawk commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates all Kotlin reactive Coroutine/Flow/Builder extensions (maps-ktx and maps-utils-ktx from android-maps-ktx) directly into android-maps-utils, establishing a single canonical source of truth (v6.0.0-rc01).

Key Changes

  1. Canonical Implementation Relocation (com.google.maps.android.*)
    • Migrated all 32 source KTX files into android-maps-utils modules (:library, :clustering, :data, :heatmaps).
    • Extensions (awaitMap(), mapClickEvents(), addMarker { ... }) now reside directly inside canonical non-ktx packages (com.google.maps.android, com.google.maps.android.model, com.google.maps.android.collections, com.google.maps.android.clustering, com.google.maps.android.data.geojson, com.google.maps.android.data.kml, com.google.maps.android.heatmaps).
  2. Backward-Compatibility Bridge Layer (com.google.maps.android.ktx.*)
    • Preserved full legacy com.google.maps.android.ktx.* package structure via @Deprecated(level = DeprecationLevel.WARNING, replaceWith = ReplaceWith(...)) forwarding wrappers and typealiases.
    • Ensures zero breaking changes for existing codebases while guiding developers toward canonical replacements.
  3. Comprehensive Test Suite & Verification
    • Migrated all 18 KTX unit test suites with both Canonical Tests and Shim Tests to verify side-by-side execution (100% pass rate across 160 test tasks).
  4. Demo App & Documentation
    • Integrated KtxExtensionsDemoActivity into :demo illustrating both canonical and bridge builder usage without duplicate class issues.
    • Updated README.md and CHANGELOG.md with consolidation guidelines and 6.0.0-rc01 notes.
    • Ran dokkaGenerate to update public API documentation.

kikoso and others added 30 commits October 30, 2025 15:46
Previously, the  task did not correctly trigger the  check, allowing the demo app to attempt building without the necessary API key. This commit refines the logic to:
- Enforce  presence for all tasks that build the  module (e.g., , , , , ).
- Allow non-build tasks (e.g., , ) to proceed without the  file, printing a warning instead of throwing an error.

This ensures that tests can run independently while preventing incomplete demo app builds.
The secrets check in `demo/build.gradle.kts` has been refined to address issues with Android Studio Gradle syncs and to more accurately enforce the presence of `secrets.properties` for build-related tasks.

Previously, the script would fail during an Android Studio sync (when no specific tasks are requested) due to an overly broad interpretation of "build task." This commit introduces the following changes:

- **Graceful handling of IDE syncs:** If no tasks are explicitly requested (common during IDE sync), a warning is now issued instead of a hard failure. This allows the IDE to sync successfully while still informing the developer about the missing secrets.
- **Stricter enforcement for build tasks:** For command-line builds or tasks that are not explicitly exempt (e.g., `clean`, `test`, `lint`), the script will now correctly throw an error if `secrets.properties` is missing.

This ensures a better developer experience by preventing unnecessary build failures during IDE operations, while maintaining the necessary security check for actual application builds.
The previous logic prevented any  task from running without a  file. This change allows the  task to run if it's accompanied by a test-related task, such as . This enables running test reports without needing to provide API keys.
…tasks (e.g., `:demo:assembleDebug`) when validating secrets.
Improved and expanded assertions in `GeoJsonParserTest` for:
- `earthquakes_with_usa.json`
- `south_london_line_geojson.json`
- `south_london_square_geojson.json`
- `usa.json`
- `earthquakes.json`

Tests now include detailed verification of feature counts, properties, geometry types, and coordinate values to ensure robust GeoJSON parsing.
adds Truth Subjects for Points and LatLngAlt.kt
Establish the pattern to migrate off GeoData object.

Additionally, a minor typo in `testAmuBallonGxPrefix` has been corrected.
- Add `LatLonBoxSubject` to support cleaner, tolerance-based assertions for KML bounds using Google Truth.
- Update `amu_empty_hotspot.kml` to wrap contents in a `<Document>` tag, ensuring valid KML structure for parsing.
- Refactor `KmlParserTest` to use new assertions, remove dead code/comments, and fix a resource filename typo ("ballon" -> "balloon").
- Inline variable in `KmlParser.parseAsKml` for brevity.
Adds support for rotation in LatLonBox
Update the geojson tests to use the geojson specific model.
Refactor GeoJSON parsing and mapping for type-safe coordinates.

This commit refactors GeoJSON parsing to use a new Coordinates data class, simplifying GeoJsonObjects and GeoJsonParser. It also introduces a platform-agnostic renderer model and an initial MapViewRenderer implementation. Test updates are included to reflect these changes and ensure correctness, improving overall code robustness and maintainability.
This commit introduces the `KmlMapper` to transform KML data models into the platform-agnostic renderer model (`Scene` and `Feature` objects).

Key changes include:
- **`KmlMapper.kt`**: A new mapper that converts existing KML parser model objects into the generic renderer model, handling geometry transformations and nullability.
- **`KmlMapperTest.kt`**: Comprehensive unit tests to verify the correct functioning of the `KmlMapper`, ensuring accurate conversion of KML Points, LineStrings, Polygons, and MultiGeometries, as well as handling of nested structures and null-safe coordinate access.

This adds support for KML data within the new `onion` rendering architecture, leveraging existing KML parsing capabilities.
kikoso and others added 29 commits February 26, 2026 14:10
* docs: add AI integration standards to rewrite branch

* chore: add release-please annotation to AI prompts

* chore: add AI prompt files to release-please-config.json

* docs: bump version in AI prompts to 4.1.1

* docs: remove compose utils reference from AI prompts
* chore: add clustering algorithms benchmark tests

* docs: added header

* chore: add benchmarks for remaining clustering algorithms

* chore: add license header to BenchmarkTest.kt

* docs: add clustering benchmark dashboard
* feat: add BoM module and fix artifactIds

    * Adds a new  module applying the  plugin
    * Adds  to standardise publishing of the BoM
    * Fixes an issue where all modules were being published with the legacy  artifact ID, which would cause them to overwrite each other on Maven Central. Modules are now published as , , etc. while  correctly retains .

* docs: add license
…maps-utils

# Conflicts:
#	data/src/main/java/com/google/maps/android/data/kml/KmlUrlSanitizer.java
#	library/src/main/java/com/google/maps/android/clustering/view/ClusterRendererMultipleItems.java
#	library/src/main/java/com/google/maps/android/clustering/view/DefaultAdvancedMarkersClusterRenderer.java
#	library/src/main/java/com/google/maps/android/clustering/view/DefaultClusterRenderer.java
- Rewrote the geospatial data layer (`:data`) from scratch using a platform-agnostic architecture for KML and GeoJSON parsing and rendering.
- Modernized and rewrote core utilities (`PolyUtil`, `SphericalUtil`, `MathUtil`, etc.) and manager classes in idiomatic Kotlin.
- Modularized the codebase into individual submodules (`:library`, `:data`, `:clustering`, `:heatmaps`, `:ui`) to optimize build times and dependency footprints.
- Preserved full backward compatibility for existing integrations using the `:maps-utils` aggregator module.
- Added a comprehensive migration guide (MIGRATION.md) and integrated release-please support.
…apply false

- Added 'apply false' declaration for vanniktech maven-publish plugin at root level
- This fixes the classloader conflict when multiple modules share the build service
- Publishing now works: publishToMavenLocal succeeds, publishToMavenCentral reaches upload stage
- Version remains at 4.4.1
This resolves the Gradle task dependency issue where dokkaGeneratePublicationHtml
was using the output of generateArtifactIdFile without an explicit dependency.
This was causing the gh-pages workflow to fail.
Apply the security fix from PR #1703 to amu_info_window.xml and amu_text_bubble.xml.
This prevents touch event spoofing when views are obscured by other windows.
- Consolidate all reactive Coroutine/Flow/Builder extensions into android-maps-utils canonical packages (com.google.maps.android.*)
- Preserve com.google.maps.android.ktx.* as deprecated compatibility layer with @deprecated forwarding wrappers and typealiases
- Migrate all 18 KTX unit test suites with both canonical and shim test coverage (100% pass rate across 160 test tasks)
- Add KtxExtensionsDemoActivity demonstrating reactive extensions to demo app
- Update version to 6.0.0-rc01 and update README.md/CHANGELOG.md
Base automatically changed from feat/rewrite-android-maps-utils to main July 15, 2026 16:38
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.

2 participants