Skip to content

chore: enable Kotlin explicitApi() and Binary Compatibility Validator (.api dumps) - #1800

Draft
dkhawk wants to merge 1 commit into
feat/migrate-ktx-to-utilsfrom
chore/explicit-api-and-bcv
Draft

dkhawk wants to merge 1 commit into
feat/migrate-ktx-to-utilsfrom
chore/explicit-api-and-bcv

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Addresses #1794 in a stacked PR on top of #1716 (feat/migrate-ktx-to-utils).

Summary of Changes

  1. Enable Kotlin Explicit API Mode:

    • Configured kotlin { explicitApi() } in library/build.gradle.kts, clustering/build.gradle.kts, data/build.gradle.kts, heatmaps/build.gradle.kts, and ui/build.gradle.kts.
    • Updated all existing Kotlin source declarations with explicit visibility modifiers and explicit return types across all 5 published library modules.
  2. Configure Binary Compatibility Validator (BCV):

    • Wired BCV v0.18.2 in build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt and root build.gradle.kts to support AGP 9.3 compiled release classes (bundleLibCompileToJarRelease / classes.jar).
    • Registered apiBuild, apiDump, and apiCheck tasks per library module with R and BuildConfig exclusion filters.
    • Registered aggregate apiDump and apiCheck verification tasks on root project and wired check to depend on apiCheck.
  3. Baseline .api Dumps:

    • Generated and committed baseline public API dumps for:
      • library/api/library.api
      • clustering/api/clustering.api
      • data/api/data.api
      • heatmaps/api/heatmaps.api
      • ui/api/ui.api
  4. CI Workflow:

    • Added apiCheck to the PR test workflow in .github/workflows/test.yml.

Fixes #1794

… (.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
dkhawk requested a review from LoyalAbbas September 30, 2026 03:21
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 53.65% -1.85% 🍏
Files changed 67.52% 🍏

Module Coverage
Kover Gradle Plugin XML report for :library 87.74% -0.07% 🍏
Kover Gradle Plugin XML report for :heatmaps 85.02% -0.45% 🍏
Kover Gradle Plugin XML report for :ui 75.3% 🍏
Kover Gradle Plugin XML report for :data 50.48% -3.18% 🍏
Kover Gradle Plugin XML report for :clustering 32.93% -0.69% 🍏
Files
Module File Coverage
Kover Gradle Plugin XML report for :library StreetViewJavaHelper.kt 100% 🍏
MathUtil.kt 100% 🍏
SphericalUtil.kt 99.71% 🍏
PolyUtil.kt 99.37% 🍏
MapObjectManager.kt 97.1% 🍏
MarkerManager.kt 81.43% 🍏
PolygonManager.kt 81.08% 🍏
CircleManager.kt 81.08% 🍏
GroundOverlayManager.kt 81.08% 🍏
PolylineManager.kt 81.08% 🍏
StreetViewUtil.kt 34.02% -1.66% 🍏
Kover Gradle Plugin XML report for :heatmaps WeightedLatLng.kt 100% 🍏
Gradient.kt 88.4% -1.9% 🍏
HeatmapTileProvider.kt 87.65% 🍏
Kover Gradle Plugin XML report for :ui AnimationUtil.kt 92% 🍏
IconGenerator.kt 89.85% 🍏
RotationLayout.kt 62.5% 🍏
SquareTextView.kt 0% 🍏
Kover Gradle Plugin XML report for :data Point.kt 100% 🍏
Style.kt 100% 🍏
Feature.kt 100% 🍏
GroundOverlayStyle.kt 100% 🍏
Geometry.kt 100% 🍏
GeoJsonObjects.kt 96.92% 🍏
LatLngAlt.kt 91.67% 🍏
KmlParser.kt 90.53% -5.33% ❌
GeoJsonParser.kt 89.39% -1.4% ❌
GpxParser.kt 88.68% -8.49% ❌
KmzParser.kt 87.85% -0.4% 🍏
KmlMapper.kt 87.36% 🍏
DataLayer.kt 87.35% 🍏
Layer.kt 86.05% 🍏
GpxMapper.kt 69.05% -3.4% ❌
GroundOverlay.kt 65.31% 🍏
MapViewRenderer.kt 60.7% 🍏
GeoJsonPolygon.kt 56.25% -2.5% 🍏
GeoJsonMapper.kt 56.25% 🍏
KmlModel.kt 54.26% -0.6% 🍏
GpxModel.kt 52.22% -1.37% 🍏
DataScene.kt 52.22% -17.78% ❌
UrlIconProvider.kt 48.9% 🍏
Style.kt 39.02% 🍏
KmlPolygon.kt 32.22% -3.33% 🍏
GeoJsonPolygonStyle.kt 19.17% 🍏
GeoJsonLineStringStyle.kt 15.87% 🍏
GeoJsonPointStyle.kt 15.82% 🍏
GoogleMapRenderer.kt 0.76% -0.96% ❌
DataLayerLoader.kt 0% 🍏
KmlStyle.kt 0% 🍏
Model.kt 0% ❌
MapObject.kt 0% 🍏
Polyline.kt 0% -99.13% ❌
Layer.kt 0% -18.75% ❌
Marker.kt 0% -99.16% ❌
Circle.kt 0% -98.85% ❌
Polygon.kt 0% -94.87% ❌
Kover Gradle Plugin XML report for :clustering SphericalMercatorProjection.kt 100% 🍏
CentroidNonHierarchicalDistanceBasedAlgorithm.kt 100% 🍏
NonHierarchicalViewBasedAlgorithm.kt 100% 🍏
AbstractAlgorithm.kt 100% 🍏
ScreenBasedAlgorithmAdapter.kt 100% 🍏
GridBasedAlgorithm.kt 100% 🍏
PreCachingAlgorithmDecorator.kt 100% 🍏
StaticCluster.kt 100% 🍏
Bounds.kt 100% 🍏
ContinuousZoomEuclideanCentroidAlgorithm.kt 99.63% 🍏
NonHierarchicalDistanceBasedAlgorithm.kt 99.48% 🍏
Point.kt 94.87% 🍏
PointQuadTree.kt 94.71% 🍏
ClusterManager.kt 71.59% 🍏
DefaultClusterRenderer.kt 14.86% -0.84% ❌
ClusterRendererMultipleItems.kt 0.15% -0.97% ❌
DefaultAdvancedMarkersClusterRenderer.kt 0% -1.22% ❌

This branch has not been deployed

No deployments
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