Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0a0e109
build: modularisation
kikoso Oct 30, 2025
659cc47
chore: fixed tests
kikoso Nov 17, 2025
ae2e4d1
Merge pull request #3 from kikoso/chore/fixed-tests
dkhawk Nov 17, 2025
df5ac71
feat: add check for secrets.properties
dkhawk Nov 17, 2025
e0bc808
chore: add dummy secrets.properties for CI workflows
dkhawk Nov 17, 2025
0219a9f
Fix: Conditionally enforce secrets.properties for demo module builds
dkhawk Nov 17, 2025
725389c
chore: improved messaging for the missing secrets.properties detector
dkhawk Nov 17, 2025
4c8feb4
Refactor: Improve secrets check logic in demo build.gradle.kts
dkhawk Nov 17, 2025
5b874c1
chore: fix wrong indent in test.yml file.
dkhawk Nov 17, 2025
c7e13e6
fix: Allow test reports to run without secrets
dkhawk Nov 17, 2025
e2fdb66
chore: Fixes task name detection to correctly handle module-prefixed …
dkhawk Nov 18, 2025
b1fa59c
Merge pull request #4 from kikoso/chore/enforce-secrets-for-builds
dkhawk Nov 19, 2025
a6d842a
test(data-geojson-parser): Strengthen GeoJsonParser tests
dkhawk Nov 20, 2025
c775be0
feat: KML parser (WIP)
dkhawk Nov 20, 2025
65c0941
WIP: kml parser tests - close but still have some issues to address.
dkhawk Nov 20, 2025
388d474
refactor: rename Coords to LatLngAlt
dkhawk Nov 20, 2025
0baef9d
feat(data): restore data module from main
dkhawk Nov 20, 2025
c97154f
feat: creates new "onion" module which will replace the data module w…
dkhawk Nov 20, 2025
92da9f4
feat: more Kml Parser Tests
dkhawk Nov 21, 2025
6481da8
fix(kml): Use the KML object for testing in testAmuBasicPlacemarkPoint
dkhawk Nov 21, 2025
1f25ba7
fix(kml): Migrates several tests to use the KML model
dkhawk Nov 21, 2025
b56b251
fix(kml): Migrates more tests to use the KML model
dkhawk Nov 21, 2025
457787e
test(kml): add LatLonBoxSubject and refactor parser tests
dkhawk Nov 21, 2025
6a475fd
test(kml): adds IconStyle and LabelStyle to the Style definition
dkhawk Nov 21, 2025
193a078
test(kml): multigeometry place marks tests
dkhawk Nov 21, 2025
b2db61e
test(kml): fixes testAmuPolyStyleBooleanAlpha
dkhawk Nov 21, 2025
41f6e44
test(kml): fixes final KmlParserTest tests
dkhawk Nov 21, 2025
bd543bd
feat(geojson): Create a data model specific to geojson files
dkhawk Nov 21, 2025
77568d5
feat: Introduce renderer model
dkhawk Nov 22, 2025
3d816bc
feat: Add KML to renderer model mapper and tests
dkhawk Nov 22, 2025
f7be82c
refactor(kml): Use LatLngAlt object directly in KmlPoint
dkhawk Nov 23, 2025
0a6156d
fix: parse the coordinates for LineString and LinearRing using a cust…
dkhawk Nov 23, 2025
6fd081f
refactor(kml): Use custom serializers for Boolean and Color
dkhawk Nov 23, 2025
a03cac6
Merge remote-tracking branch 'origin/feat/onion-layers' into feat/uni…
dkhawk Nov 25, 2025
506176f
Merge remote-tracking branch 'origin/feat/onion-renderer' into feat/u…
dkhawk Nov 25, 2025
5a9d47b
Merge remote-tracking branch 'origin/feat/use-custom-serializers' int…
dkhawk Nov 25, 2025
6113293
feat: Integrate and operationalize KML rendering demo
dkhawk Nov 25, 2025
5bc1ad7
feat: Implement GPX support with parser, mapper, and demo integration
dkhawk Nov 25, 2025
995f435
feat: Address PR review comments and refactor build process
dkhawk Dec 1, 2025
8d4c759
fix: restore demo/build.gradle.kts changes
dkhawk Dec 1, 2025
23cf6f0
Merge pull request #9 from kikoso/feat/unified-kml-renderer
dkhawk Dec 1, 2025
b30263e
Refactor onion module and update demo app
dkhawk Dec 2, 2025
bdcf713
feat: Address PR comments
dkhawk Dec 3, 2025
a5d8c00
refactor(renderer-demo): fix additional imports.
dkhawk Dec 3, 2025
c9e5ae9
Merge pull request #10 from kikoso/feat/finish-data-layer-port
dkhawk Dec 3, 2025
2fd4496
feat: using Gemini to perform UI tests (#8)
kikoso Dec 4, 2025
4a5ca15
feat: Refactor IconProvider (#12)
dkhawk Dec 4, 2025
dd45946
fix: fix broken catalog file (#13)
dkhawk Dec 5, 2025
52dc3bf
feat: Adds gemini-based visual testing to the RendererDemoActivity (#14)
dkhawk Dec 8, 2025
bd627b6
feat(ui): port ui module to Kotlin and refactor visual tests (#15)
dkhawk Feb 13, 2026
217ec09
feat!: refactoring of clustering module (#16)
kikoso Feb 20, 2026
faa2bef
Merge remote-tracking branch 'googlemaps/main' into feat/rewrite-andr…
kikoso Feb 26, 2026
c93bdad
docs: add license header
kikoso Feb 26, 2026
141a6bf
docs: add license header as Google LLC
kikoso Feb 26, 2026
aca80b1
docs: add license header as 2026
kikoso Feb 26, 2026
d33ddc3
docs: add license header as a new year
kikoso Feb 26, 2026
3747714
docs: add license header as a new year
kikoso Feb 26, 2026
d141b8a
docs: add license header as a new year
kikoso Feb 26, 2026
cdce017
docs: add license header as a new year
kikoso Feb 26, 2026
c3ccaca
docs: add license header as a new year
kikoso Feb 26, 2026
75755b0
docs: add license header as a new year
kikoso Feb 26, 2026
e2cbe8d
feat: increased minSdk to 23
kikoso Feb 26, 2026
7598a2e
feat: increased minSdk to 23
kikoso Feb 26, 2026
cce4b35
feat: increased minSdk to 23
kikoso Feb 26, 2026
7800401
feat: added test block option
kikoso Feb 26, 2026
e0e7960
test: added default test
kikoso Feb 26, 2026
0be1bc6
docs: added license header
kikoso Feb 26, 2026
6c5bcf2
docs: add AI integration standards (#1668)
kikoso Mar 26, 2026
ad1d411
chore: Add clustering algorithms benchmark tests (#1665)
kikoso Mar 26, 2026
e1d2ee5
build: updated AGP (#1670)
kikoso Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 50 additions & 0 deletions .gemini/skills/android-maps-utils/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: maps-utils-android
description: Guide for integrating the Google Maps Utility Library for Android (android-maps-utils) into an application. Use when users ask to add features like Marker Clustering, Heatmaps, GeoJSON, KML, or Polyline encoding/decoding.
---

# Google Maps Utility Library for Android Integration

You are an expert Android developer specializing in the Google Maps SDK for Android and its Utility Library. Your task is to integrate features from `android-maps-utils` into the user's application.

## 1. Setup Dependencies

Add the necessary dependency to the app-level `build.gradle.kts` file:

```kotlin
dependencies {
// Google Maps Utility Library
implementation("com.google.maps.android:android-maps-utils:4.1.1") // x-release-please-version
}
```

## 2. Core Features & Usage Patterns

When a user asks for advanced features, implement them using these established patterns from the Utility Library:

### Marker Clustering
Used to manage multiple markers at different zoom levels.
1. Create a `ClusterItem` data class.
2. Initialize a `ClusterManager` inside `onMapReady`.
3. Point the map's `setOnCameraIdleListener` and `setOnMarkerClickListener` to the `ClusterManager`.
4. Add items using `clusterManager.addItem()`.

### Heatmaps
Used to represent the density of data points.
1. Provide a `Collection<LatLng>` or `Collection<WeightedLatLng>`.
2. Create a `HeatmapTileProvider` with the builder `HeatmapTileProvider.Builder().data(list).build()`.
3. Add the overlay to the map: `map.addTileOverlay(TileOverlayOptions().tileProvider(provider))`.

### GeoJSON and KML
Used to import geographic data from external files.
* **GeoJSON:** `val layer = GeoJsonLayer(map, R.raw.geojson_file, context); layer.addLayerToMap()`
* **KML:** `val layer = KmlLayer(map, R.raw.kml_file, context); layer.addLayerToMap()`

### Polyline Decoding and Spherical Geometry
Used for server-client coordinate compression and distance calculations.
* **Decoding:** `PolyUtil.decode(encodedPathString)`
* **Distance:** `SphericalUtil.computeDistanceBetween(latLng1, latLng2)`

## 3. Best Practices
1. **Performance:** For massive datasets (e.g., parsing huge GeoJSON files), do not block the main thread. Parse on a background dispatcher and only call `layer.addLayerToMap()` on the UI thread.
2. **Custom Renderers:** If the user wants custom cluster icons, extend `DefaultClusterRenderer` and override `onBeforeClusterItemRendered` and `onBeforeClusterRendered`.
40 changes: 40 additions & 0 deletions .geminiignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Ignore build and generated directories
build/
**/build/
.gradle/
.idea/
.kotlin/
.vscode/

# Ignore outputs
*.apk
*.ap_
*.aab
*.dex
*.class

# Ignore large media assets (images, fonts, etc) unless specifically required
**/*.png
**/*.jpg
**/*.jpeg
**/*.gif
**/*.webp
**/*.svg
**/*.mp4
**/*.mp3
**/*.wav
**/*.ttf
**/*.woff
**/*.woff2
**/*.otf

# Ignore temporary and cache files
tmp/
**/tmp/
*.log
*.tmp
*.bak
*.swp
*~.nib
local.properties
.DS_Store
2 changes: 1 addition & 1 deletion .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .github/header-checker-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint-report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,6 +36,9 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Create dummy secrets.properties
run: echo "MAPS_API_KEY=dummy" > secrets.properties

- name: Run Android Lint
run: ./gradlew lint

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Create dummy secrets.properties
run: echo "MAPS_API_KEY=dummy" > secrets.properties

- name: Build modules
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace

Expand All @@ -56,4 +59,4 @@ jobs:
min-coverage-changed-files: 60
title: Code Coverage
debug-mode: false
update-comment: true
update-comment: true
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Create dummy secrets.properties
run: echo "MAPS_API_KEY=dummy" > secrets.properties

- name: Build modules
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ project.properties
secrets.properties
.kotlin

# Build artifacts
build-logic/convention/bin
lint-checks/bin

# This covers new IDEs, like Antigravity
.vscode/
**/bin/
**/bin/
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ information on using pull requests.

This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).

## Using AI to Contribute

This repository provides an official Gemini Skill to help AI agents navigate and contribute to the project effectively. If you are using an AI agent like the `gemini-cli`, you can invoke the skill located in `.gemini/skills/android-maps-utils` to learn how to interact with the codebase.

Additionally, the `.geminiignore` file prevents AI tools from consuming large or irrelevant files to preserve context limits. You can also reference the generic `llm-integration-prompt.md` to feed into web-based LLMs for general assistance.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ If you wish to disable this, you can do so by removing the initializer in your `

Contributions are welcome and encouraged! If you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing guide].

### Using AI
This repository provides an official Gemini Skill and an `llm-integration-prompt.md` to help AI agents navigate the codebase and provide assistance. Refer to the [contributing guide] for more details on AI usage.


## Terms of Service

This library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform [Terms of Service].
Expand Down
2 changes: 1 addition & 1 deletion build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Google LLC
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 Google LLC
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -89,7 +89,7 @@ class PublishingConventionPlugin : Plugin<Project> {
developers {
developer {
id.set("google")
name.set("Google Inc.")
name.set("Google LLC")
}
}
organization {
Expand Down
2 changes: 1 addition & 1 deletion build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Google LLC
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
12 changes: 10 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Google LLC
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,4 +47,12 @@ allprojects {
// {x-release-please-start-version}
version = "4.0.0"
// {x-release-please-end}
}

plugins.withId("java") {
configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
}
}
94 changes: 94 additions & 0 deletions clustering/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

/**
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id("kotlin-android")
id("org.jetbrains.dokka")
id("android.maps.utils.PublishingConventionPlugin")
}

android {
lint {
sarifOutput = layout.buildDirectory.file("reports/lint-results.sarif").get().asFile
}
defaultConfig {
compileSdk = libs.versions.compileSdk.get().toInt()
minSdk = 23
testOptions.targetSdk = libs.versions.targetSdk.get().toInt()
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
resourcePrefix = "amu_"

installation {
timeOutInMs = 10 * 60 * 1000 // 10 minutes
installOptions("-d", "-t")
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
jvmToolchain(17)
}

testOptions {
animationsDisabled = true
unitTests.isIncludeAndroidResources = true
unitTests.isReturnDefaultValues = true
}
namespace = "com.google.maps.android.clustering"
}

dependencies {
implementation(project(":ui"))
implementation(project(":library"))
implementation(project(":data"))
api(libs.play.services.maps)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.appcompat)
implementation(libs.core.ktx)
lintPublish(project(":lint-checks"))
testImplementation(libs.junit)
testImplementation(libs.robolectric)
testImplementation(libs.kxml2)
testImplementation(libs.mockk)
testImplementation(libs.kotlin.test)
testImplementation(libs.truth)
implementation(libs.kotlin.stdlib.jdk8)

testImplementation(libs.mockk)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.robolectric)
testImplementation(libs.mockito.core)
}

tasks.register("instrumentTest") {
dependsOn("connectedCheck")
}

if (System.getenv("JITPACK") != null) {
apply(plugin = "maven")
}
Empty file added clustering/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions clustering/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Loading
Loading