Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googlemaps/android-maps-utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.6.1
Choose a base ref
...
head repository: googlemaps/android-maps-utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 4,449 additions and 963 deletions.
  1. +16 −1 .github/blunderbuss.yml
  2. +14 −0 .github/dependabot.yml
  3. +21 −21 .github/{workflows/dependabot.yml → header-checker-lint.yml}
  4. +14 −0 .github/stale.yml
  5. +15 −7 .github/workflows/docs.yml
  6. +49 −0 .github/workflows/lint-report.yml
  7. +10 −10 .github/workflows/release.yml
  8. +61 −0 .github/workflows/report.yml
  9. +6 −5 .github/workflows/test.yml
  10. +2 −0 .gitignore
  11. +6 −6 .releaserc
  12. +0 −323 CHANGELOG.md
  13. +61 −36 README.md
  14. +2 −0 build-logic/.gitignore
  15. +42 −0 build-logic/convention/build.gradle.kts
  16. +134 −0 build-logic/convention/src/main/kotlin/PublishingConventionPlugin.kt
  17. +30 −0 build-logic/settings.gradle.kts
  18. +0 −185 build.gradle
  19. +41 −0 build.gradle.kts
  20. +0 −74 demo/build.gradle
  21. +82 −0 demo/build.gradle.kts
  22. +77 −22 demo/src/main/AndroidManifest.xml
  23. +71 −0 demo/src/main/java/com/google/maps/android/utils/demo/ApiKeyValidator.kt
  24. +9 −0 demo/src/main/java/com/google/maps/android/utils/demo/BaseDemoActivity.java
  25. +292 −0 demo/src/main/java/com/google/maps/android/utils/demo/ClusteringDiffDemoActivity.java
  26. +1 −1 demo/src/main/java/com/google/maps/android/utils/demo/ClusteringViewModel.java
  27. +1 −2 demo/src/main/java/com/google/maps/android/utils/demo/ClusteringViewModelDemoActivity.java
  28. +230 −0 .../src/main/java/com/google/maps/android/utils/demo/CustomAdvancedMarkerClusteringDemoActivity.java
  29. +1 −1 demo/src/main/java/com/google/maps/android/utils/demo/CustomMarkerClusteringDemoActivity.java
  30. +2 −0 demo/src/main/java/com/google/maps/android/utils/demo/DistanceDemoActivity.java
  31. +9 −3 demo/src/main/java/com/google/maps/android/utils/demo/MainActivity.java
  32. +24 −1 demo/src/main/java/com/google/maps/android/utils/demo/StreetViewDemoActivity.kt
  33. +17 −0 demo/src/main/java/com/google/maps/android/utils/demo/model/Person.java
  34. +14 −14 demo/src/main/res/layout/distance_demo.xml
  35. +14 −14 demo/src/main/res/layout/geojson_demo.xml
  36. +14 −14 demo/src/main/res/layout/heatmaps_demo.xml
  37. +14 −14 demo/src/main/res/layout/kml_demo.xml
  38. +17 −14 demo/src/main/res/layout/map.xml
  39. +43 −0 demo/src/main/res/layout/map_with_floating_button.xml
  40. +20 −17 demo/src/main/res/layout/places_demo.xml
  41. +16 −0 demo/src/main/res/layout/street_view_demo.xml
  42. +14 −13 demo/src/main/res/values/strings.xml
  43. +38 −0 demo/src/test/java/com/google/maps/android/utils/demo/ApiKeyValidatorTest.kt
  44. +2 −2 gradle.properties
  45. +49 −0 gradle/libs.versions.toml
  46. BIN gradle/wrapper/gradle-wrapper.jar
  47. +4 −1 gradle/wrapper/gradle-wrapper.properties
  48. +28 −13 gradlew
  49. +9 −6 gradlew.bat
  50. +0 −75 library/build.gradle
  51. +80 −0 library/build.gradle.kts
  52. +16 −0 library/src/main/AndroidManifest.xml
  53. +22 −6 library/src/main/java/com/google/maps/android/StreetViewUtil.kt
  54. +29 −0 library/src/main/java/com/google/maps/android/clustering/ClusterManager.java
  55. +10 −2 library/src/main/java/com/google/maps/android/clustering/algo/GridBasedAlgorithm.java
  56. +5 −4 library/src/main/java/com/google/maps/android/clustering/algo/NonHierarchicalViewBasedAlgorithm.java
  57. +5 −3 library/src/main/java/com/google/maps/android/clustering/algo/ScreenBasedAlgorithm.java
  58. +1,255 −0 library/src/main/java/com/google/maps/android/clustering/view/ClusterRendererMultipleItems.java
  59. +1,185 −0 .../src/main/java/com/google/maps/android/clustering/view/DefaultAdvancedMarkersClusterRenderer.java
  60. +6 −16 library/src/main/java/com/google/maps/android/clustering/view/DefaultClusterRenderer.java
  61. +6 −0 library/src/main/java/com/google/maps/android/collections/MarkerManager.java
  62. +9 −0 library/src/main/java/com/google/maps/android/data/Style.java
  63. +8 −3 library/src/main/java/com/google/maps/android/data/kml/KmlFeatureParser.java
  64. +0 −1 library/src/main/java/com/google/maps/android/data/kml/KmlLayer.java
  65. +19 −10 library/src/main/java/com/google/maps/android/data/kml/KmlStyleParser.java
  66. +16 −0 library/src/test/java/com/google/maps/android/StreetViewUtilTest.kt
  67. +30 −6 library/src/test/java/com/google/maps/android/data/kml/KmlFeatureParserTest.java
  68. +9 −1 library/src/test/java/com/google/maps/android/data/kml/KmlParserTest.java
  69. +28 −3 library/src/test/resources/amu_empty_hotspot.kml
  70. +10 −0 library/src/test/resources/amu_wrong_not_exist_coordinates.kml
  71. +10 −0 library/src/test/resources/amu_wrong_not_exist_latitude_coordinates.kml
  72. +25 −10 lint-checks/build.gradle
  73. +16 −3 settings.gradle → settings.gradle.kts
  74. +14 −0 tools/android-wait-for-emulator.sh
17 changes: 16 additions & 1 deletion .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# Copyright 2024 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.

assign_issues: []
assign_prs: []
assign_prs:
- dkhawk
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2024 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.

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,24 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Dependabot
on: pull_request
# Presubmit test that ensures that source files contain valid license headers
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/header-checker-lint
# Install: https://github.com/apps/license-header-lint-gcf

permissions:
contents: write

jobs:
test:
uses: ./.github/workflows/test.yml
dependabot:
needs: test
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.SYNCED_GITHUB_TOKEN_REPO}}
steps:
- name: approve
run: gh pr review --approve "$PR_URL"
- name: merge
run: gh pr merge --auto --squash --delete-branch "$PR_URL"
allowedCopyrightHolders:
- 'Google LLC'
allowedLicenses:
- 'Apache-2.0'
sourceFileExtensions:
- 'yaml'
- 'yml'
- 'sh'
- 'ts'
- 'js'
- 'java'
- 'html'
- 'txt'
- 'kt'
- 'kts'
- 'xml'
- 'gradle'
14 changes: 14 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2024 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.

# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
22 changes: 15 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,38 +29,46 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK 17
uses: actions/setup-java@v2.3.1
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'temurin'
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.20'

# Run dokka and create tar
- name: Generate documentation
run: |
./gradlew dokkaHtml
echo "Creating tar for generated docs"
cd $GITHUB_WORKSPACE/build/dokka/html && tar cvf ~/android-maps-utils-docs.tar .
cd $GITHUB_WORKSPACE/library/build/dokka/html && tar cvf ~/android-maps-utils-docs.tar .
echo "Unpacking tar into gh-pages branch"
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
go install github.com/google/addlicense@latest
addlicense .
cd $GITHUB_WORKSPACE && git checkout gh-pages && tar xvf ~/android-maps-utils-docs.tar
# Commit changes and create a PR
- name: PR Changes
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
commit-message: 'docs: Update docs'
author: googlemaps-bot <googlemaps-bot@google.com>
committer: googlemaps-bot <googlemaps-bot@google.com>
labels: docs
labels: |
docs
automerge
title: 'docs: Update docs'
body: |
Updated GitHub pages with latest from `./gradlew dokkaHtml`.
49 changes: 49 additions & 0 deletions .github/workflows/lint-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2024 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.

name: Lint and Upload SARIF

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'

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

- name: Merge SARIF files
run: |
jq -s '{ "$schema": "https://json.schemastore.org/sarif-2.1.0", "version": "2.1.0", "runs": map(.runs) | add }' library/build/reports/lint-results-debug.sarif demo/build/reports/lint-results-debug.sarif > merged.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: merged.sarif
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -23,40 +23,40 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1.1.0
- uses: gradle/actions/wrapper-validation@v4
- name: Create .gpg key
run: |
echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc
echo "Build and publish"
sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties
SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,sonatypeToken=,sonatypeToken=$SONATYPE_TOKEN_USERNAME,g" gradle.properties
SONATYPE_TOKEN_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_TOKEN_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypeTokenPassword=,sonatypeTokenPassword=$SONATYPE_TOKEN_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties
env:
GPG_KEY_ARMOR: "${{ secrets.SYNCED_GPG_KEY_ARMOR }}"
GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }}
GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SYNCED_SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SYNCED_SONATYPE_USERNAME }}
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN }}

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '14'

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3.4.1
uses: cycjimmy/semantic-release-action@v4.1.1
with:
extra_plugins: |
"@semantic-release/commit-analyzer@8.0.1"
61 changes: 61 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2024 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.

# A workflow that runs tests on every new pull request
name: Run unit tests

on:
repository_dispatch:
types: [test]
push:
branches-ignore: ['gh-pages']
pull_request:
branches-ignore: ['gh-pages']
workflow_dispatch:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'temurin'

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

- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1.7.1
with:
paths: |
${{ github.workspace }}/library/build/jacoco/jacoco.xml
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
min-coverage-overall: 26
min-coverage-changed-files: 60
title: Code Coverage
debug-mode: false
update-comment: true
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -28,20 +28,21 @@ on:
jobs:
test:
runs-on: ubuntu-latest

permissions:
pull-requests: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.1.0
uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'temurin'

- name: Build modules
run: ./gradlew build jacocoTestReport --stacktrace
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,3 +10,5 @@ library/gen
project.properties
.DS_Store
.java-version
secrets.properties
.kotlin
12 changes: 6 additions & 6 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ plugins:
- - "@google/semantic-release-replace-plugin"
- replacements:
- files:
- "build.gradle"
from: "\\bversion = '.*'"
to: "version = '${nextRelease.version}'"
- "build.gradle.kts"
from: "\\bversion = \".*\""
to: "version = \"${nextRelease.version}\""
- files:
- "build.gradle"
- "build.gradle.kts"
from: "com.google.maps.android:android-maps-utils:([0-9]+).([0-9]+).([0-9]+)"
to: "com.google.maps.android:android-maps-utils:${nextRelease.version}'"
- files:
@@ -20,10 +20,10 @@ plugins:
to: ":${nextRelease.version}"
- - "@semantic-release/exec"
- prepareCmd: "./gradlew build --warn --stacktrace"
publishCmd: "./gradlew publish --warn --stacktrace"
publishCmd: "./gradlew publish --warn --stacktrace --debug --info"
- - "@semantic-release/git"
- assets:
- "build.gradle"
- "build.gradle.kts"
- "*.md"
- "@semantic-release/github"
options:
Loading