chore: enable Kotlin explicitApi() and Binary Compatibility Validator (.api dumps) - #1800
Merged
Merged
Conversation
Contributor
Code Coverage
Files |
dkhawk
marked this pull request as ready for review
September 30, 2026 16:40
dkhawk
force-pushed
the
feat/migrate-ktx-to-utils
branch
from
September 30, 2026 16:43
e7d9d13 to
7dbc806
Compare
kikoso
requested changes
Sep 30, 2026
dkhawk
force-pushed
the
chore/explicit-api-and-bcv
branch
from
September 30, 2026 20:10
1f21863 to
867b01b
Compare
… (.api dumps) - Enable kotlin explicitApi() across published modules (:library, :clustering, :data, :heatmaps, :ui) - Add explicit public visibility and return types to all public Kotlin symbols across modules - Configure Binary Compatibility Validator (BCV) for AGP 9.3 via build-logic convention plugin and root aggregate tasks - Generate and commit baseline .api dumps for :library, :clustering, :data, :heatmaps, and :ui - Add apiCheck to the CI Pull Request test workflow Fixes #1794
dkhawk
force-pushed
the
chore/explicit-api-and-bcv
branch
from
September 30, 2026 22:36
867b01b to
02ca069
Compare
dkhawk
added a commit
that referenced
this pull request
Sep 30, 2026
* feat: migrate android-maps-ktx into android-maps-utils (v6.0.0-rc01) (#1716) - Consolidate Kotlin Extensions (KTX into Utils): Move all reactive Coroutine/Flow extensions (awaitMap, mapClickEvents, cameraMoveEvents) and option builder DSLs (addMarker, addPolyline, addPolygon) from android-maps-ktx directly into android-maps-utils. - Canonical Non-KTX Packages: Place all reactive Coroutine/Flow extensions and DSL builders in canonical com.google.maps.android.* packages. - Deprecated Compatibility Layer: Preserve the legacy com.google.maps.android.ktx.* package structure with @deprecated(level = DeprecationLevel.WARNING, replaceWith = ReplaceWith(...)) forwarding wrappers and typealiases so existing imports compile seamlessly with deprecation warnings. - Multi-Module Integration: Integrate KTX extensions across :library, :clustering, :heatmaps, and :data modules. - Demo & Test Consolidation: Include KtxExtensionsDemoActivity in :demo and integrate all 18 KTX unit test suites with both canonical and shim test coverage. * feat: port Maps SDK coroutine initialization extension from android-maps-ktx - Add canonical Context.awaitMapsSdkInitialized(preferredRenderer) suspending extension in com.google.maps.android. - Add deprecated backward-compatibility shim in com.google.maps.android.ktx. - Add canonical and shim unit test suites for MapsInitializer coroutine extensions. - Showcase awaitMapsSdkInitialized in KtxExtensionsDemoActivity and register demo in MainActivity. - Update README.md documentation with awaitMapsSdkInitialized usage example. * chore: release v6.0.0-rc01 * chore: release v6.0.0-rc02 * fix: resolve lint test SDK requirement and configure isolated test home for unit tests * chore: release v6.0.0-rc03 * chore: prepare v6.0.0 final release * build(deps): update dependencies for v6.0.0 release * refactor: address review comments on coroutines, inlining, and file structure * chore: release v6.0.0-rc04 * chore: align release-please version baseline with main for v6.0.0 release * fix: harden coroutine continuations, remove FQCNs/wildcard imports, and add adversarial tests * fix: address all remaining PR review comments from LoyalAbbas and kikoso * fix: add R8 consumer rules for optional location and Navigation SDK dependencies * fix(location): remove PASSIVE_PROVIDER fallback and guard missing providers * fix: resolve 10 defects uncovered by Android Maps Testing Toolkit (#1795) * fix: resolve 10 defects uncovered by Android Maps Testing Toolkit Fixes 10 production issues across `:data`, `:heatmaps`, `:clustering`, `:library`, and `:ui` uncovered by deterministic JVM and visual testing with Android Maps Testing Toolkit v1.1.0-rc01: 1. `:data` (`KmlLayer`): Cache `KmlGroundOverlay -> ModelFeature` in `mGroundOverlayMap` so `removeLayerFromMap()` removes ground overlays from `MapViewRenderer`'s `IdentityHashMap` instead of leaking them. 2. `:data` (`Style`, `MapViewRenderer`, `GeoJsonLayer`, `KmlLayer`): Propagate `clickable` (defaulting to `true`) and `visible` to `PolylineOptions` and `PolygonOptions` so GeoJSON and KML polygons and polylines dispatch `OnFeatureClickListener` callbacks. 3. `:data` (`GeoJsonLayer`, `KmlLayer`, `MapViewRenderer`): Route markers, polygons, polylines, and ground overlays through passed-in `MarkerManager`, `PolygonManager`, `PolylineManager`, and `GroundOverlayManager` collections when provided, and register click listeners on those collections instead of clobbering global `GoogleMap` click listeners. 4. `:data` (`KmlLayer`, `GeoJsonLayer`, `Style`, `MapViewRenderer`): Aggregate placemarks and ground overlays from `<Document>` containers in `hasPlacemarks()`, `getPlacemarks()`, `features`, and `getGroundOverlays()`, and preserve styles on `MultiGeometry` features via `CompositeStyle`. 5. `:data` (`GeoJsonLayer`, `Style`, `MapViewRenderer`): Propagate `GeoJsonPointStyle` `title`, `snippet`, `isDraggable`, `isFlat`, `isVisible`, `infoWindowAnchorU/V`, and custom `icon` (`BitmapDescriptor`) to `MarkerOptions` and `AdvancedMarkerOptions`. 6. `:heatmaps` (`HeatmapTileProvider`): Clamp `zoom` when indexing `maxIntensity` (preventing `ArrayIndexOutOfBoundsException` at zoom level 22) and clamp `bucketX`/`bucketY` to `0 until gridDim` so points on the inclusive upper boundary `maxX`/`maxY` do not throw `ArrayIndexOutOfBoundsException`. 7. `:heatmaps` (`HeatmapTileProvider`): Check `&& wrappedPoints.isEmpty()` before returning `TileProvider.NO_TILE` so cross-antimeridian points render across the International Date Line, and enforce `MIN_RADIUS..MAX_RADIUS` and `0.0..1.0` bounds validation in `setRadius` and `setOpacity`. 8. `:clustering` (`DefaultClusterRenderer`): Clear stale `marker.title` and `marker.snippet` when a `ClusterItem`'s title/snippet is updated to `null`, and update `marker.zIndex` in `onClusterItemUpdated` even when `position` is unchanged. 9. `:library` (`MapObjectManager`): Invoke `setListenersOnUiThread()` synchronously when constructed on the main thread instead of unconditionally posting to the back of the main looper queue. 10. `:ui` (`AnimationUtil`, `IconGenerator`, `RotationLayout`): Snap directly to `finalPosition` when `durationInMs <= 0L` (avoiding `0 / 0.0f = NaN`), clamp `t` to `[0f, 1f]` so `AccelerateDecelerateInterpolator` never rebounds on frame overshoot, and use `degrees.mod(360)` so negative multi-turn rotations do not throw `IllegalStateException`. * fix: address PR review comments on layer managers, KML accessors, Style, and cluster renderers * chore: enable Kotlin explicitApi() and Binary Compatibility Validator (.api dumps) (#1800) * chore: enable Kotlin explicitApi() and Binary Compatibility Validator (.api dumps) - Enable kotlin explicitApi() across published modules (:library, :clustering, :data, :heatmaps, :ui) - Add explicit public visibility and return types to all public Kotlin symbols across modules - Configure Binary Compatibility Validator (BCV) for AGP 9.3 via build-logic convention plugin and root aggregate tasks - Generate and commit baseline .api dumps for :library, :clustering, :data, :heatmaps, and :ui - Add apiCheck to the CI Pull Request test workflow Fixes #1794 * fix: restore public visibility on ResponseStreetView and update library.api
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.
Addresses #1794 in a stacked PR on top of #1716 (
feat/migrate-ktx-to-utils).Summary of Changes
Enable Kotlin Explicit API Mode:
kotlin { explicitApi() }inlibrary/build.gradle.kts,clustering/build.gradle.kts,data/build.gradle.kts,heatmaps/build.gradle.kts, andui/build.gradle.kts.Configure Binary Compatibility Validator (BCV):
build-logic/convention/src/main/kotlin/PublishingConventionPlugin.ktand rootbuild.gradle.ktsto support AGP 9.3 compiled release classes (bundleLibCompileToJarRelease/classes.jar).apiBuild,apiDump, andapiChecktasks per library module with R and BuildConfig exclusion filters.apiDumpandapiCheckverification tasks on root project and wiredcheckto depend onapiCheck.Baseline .api Dumps:
library/api/library.apiclustering/api/clustering.apidata/api/data.apiheatmaps/api/heatmaps.apiui/api/ui.apiCI Workflow:
apiCheckto the PR test workflow in.github/workflows/test.yml.Fixes #1794