feat: migrate android-maps-ktx into android-maps-utils (v6.0.0-rc01)#1716
Draft
dkhawk wants to merge 87 commits into
Draft
feat: migrate android-maps-ktx into android-maps-utils (v6.0.0-rc01)#1716dkhawk wants to merge 87 commits into
dkhawk wants to merge 87 commits into
Conversation
chore: fixed tests
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.
# Conflicts: # demo/build.gradle.kts
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.
build: enforce secrets for builds
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 PointSubject.kt
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.
* 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.
… play-services-maps
…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.
…eometryCollection objects
- 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
…ders across all files
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
Consolidates all Kotlin reactive Coroutine/Flow/Builder extensions (
maps-ktxandmaps-utils-ktxfromandroid-maps-ktx) directly intoandroid-maps-utils, establishing a single canonical source of truth (v6.0.0-rc01).Key Changes
com.google.maps.android.*)android-maps-utilsmodules (:library,:clustering,:data,:heatmaps).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).com.google.maps.android.ktx.*)com.google.maps.android.ktx.*package structure via@Deprecated(level = DeprecationLevel.WARNING, replaceWith = ReplaceWith(...))forwarding wrappers and typealiases.100%pass rate across 160 test tasks).KtxExtensionsDemoActivityinto:demoillustrating both canonical and bridge builder usage without duplicate class issues.README.mdandCHANGELOG.mdwith consolidation guidelines and6.0.0-rc01notes.dokkaGenerateto update public API documentation.