From f88b5d0711650e4c626d5b57b6925e14e913d830 Mon Sep 17 00:00:00 2001 From: Dale Hawkins <107309+dkhawk@users.noreply.github.com> Date: Tue, 3 Nov 2026 14:33:58 -0700 Subject: [PATCH 1/2] feat!: raise minSdk to 24 and update android-maps-utils to 7.0.0 Raises androidMinSdk from 23 to 24 to match com.google.maps.android:android-maps-utils:7.0.0 (which exposes Maps SDK 20.1.0 requiring API 24), updates README.md to Android API level 24+, and bumps Gradle to 9.8.2, AGP to 9.5.0, Dependency Analysis to 3.20.1, Spotless to 8.11.0, and Ben Manes Versions to 0.67.0. BREAKING CHANGE: the minimum supported Android API level is now 24. --- README.md | 2 +- gradle/libs.versions.toml | 12 ++++++------ gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7593542d..4400cbab 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This repository contains [Jetpack Compose][jetpack-compose] components for the [ ## Requirements -* Android API level 21+ +* Android API level 24+ * Kotlin-enabled project * Jetpack Compose-enabled project (see [releases](https://github.com/googlemaps/android-maps-compose/releases) for the required version of Jetpack Compose) * [Sign up with Google Maps Platform] diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 47416d71..ce862d24 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,18 +4,18 @@ [versions] # Base androidCompileSdk = "37" -androidMinSdk = "23" +androidMinSdk = "24" androidTargetSdk = "37" -agp = "9.4.1" +agp = "9.5.0" binaryCompatibilityValidator = "0.18.2" -dependencyAnalysis = "3.19.2" +dependencyAnalysis = "3.20.1" dokka = "2.2.0" gradleMavenPublishPlugin = "0.37.0" kotlin = "2.4.21" kotlinxCoroutines = "1.11.0" -spotless = "8.10.4" -versions = "0.66.0" +spotless = "8.11.0" +versions = "0.67.0" # Android activitycompose = "1.13.0" @@ -31,7 +31,7 @@ materialIconsExtendedAndroid = "1.7.8" # Google Maps Platform mapsecrets = "2.0.1" -mapsutils = "6.0.0" +mapsutils = "7.0.0" # Testing androidCore = "1.7.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e7bb9fd..91c4fc64 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 From 6c0aac4eec0c00f8c43ad6e16dbac005deadacbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Wed, 4 Nov 2026 05:48:50 +0100 Subject: [PATCH 2/2] fix: apply mapColorScheme with play-services-maps 20.1.0 play-services-maps 20.1.0 (pulled in by android-maps-utils 7.0.0) initializes GoogleMapOptions.mapColorScheme to -1 instead of 0. GoogleMap() only applied its mapColorScheme when the options value was 0, so the scheme was silently dropped and the color scheme instrumentation tests failed. Compare against the SDK's own default (GoogleMapOptions().mapColorScheme) so both versions work, and an explicit LIGHT in googleMapOptionsFactory is now respected on 20.1.0. The lite mode tests expect that default instead of a hardcoded LIGHT. --- .../google/maps/android/compose/GoogleMapViewTests.kt | 6 +++--- .../java/com/google/maps/android/compose/GoogleMap.kt | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/maps-app/src/androidTest/java/com/google/maps/android/compose/GoogleMapViewTests.kt b/maps-app/src/androidTest/java/com/google/maps/android/compose/GoogleMapViewTests.kt index d680c70e..7ada063d 100644 --- a/maps-app/src/androidTest/java/com/google/maps/android/compose/GoogleMapViewTests.kt +++ b/maps-app/src/androidTest/java/com/google/maps/android/compose/GoogleMapViewTests.kt @@ -186,7 +186,7 @@ class GoogleMapViewTests { ) } assertThat(capturedOptions?.liteMode).isTrue() - assertThat(capturedOptions?.mapColorScheme).isEqualTo(MapColorScheme.LIGHT) + assertThat(capturedOptions?.mapColorScheme).isEqualTo(GoogleMapOptions().mapColorScheme) } @Test @@ -208,7 +208,7 @@ class GoogleMapViewTests { } assertThat(capturedOptions?.liteMode).isTrue() assertThat(capturedOptions?.mapType).isEqualTo(GoogleMap.MAP_TYPE_TERRAIN) - assertThat(capturedOptions?.mapColorScheme).isEqualTo(MapColorScheme.LIGHT) + assertThat(capturedOptions?.mapColorScheme).isEqualTo(GoogleMapOptions().mapColorScheme) } @Test @@ -224,7 +224,7 @@ class GoogleMapViewTests { ) } assertThat(capturedOptions?.liteMode).isTrue() - assertThat(capturedOptions?.mapColorScheme).isEqualTo(MapColorScheme.LIGHT) + assertThat(capturedOptions?.mapColorScheme).isEqualTo(GoogleMapOptions().mapColorScheme) } @Test diff --git a/maps-compose/src/main/java/com/google/maps/android/compose/GoogleMap.kt b/maps-compose/src/main/java/com/google/maps/android/compose/GoogleMap.kt index 552852c1..67fbbe84 100644 --- a/maps-compose/src/main/java/com/google/maps/android/compose/GoogleMap.kt +++ b/maps-compose/src/main/java/com/google/maps/android/compose/GoogleMap.kt @@ -180,12 +180,14 @@ public fun GoogleMap( val baseOptions = googleMapOptionsFactory() val isLiteMode = baseOptions.liteMode == true // If mapColorScheme is passed to GoogleMap() and has not been explicitly set - // in googleMapOptionsFactory (where 0 / MapColorScheme.LIGHT is the Java int default), - // apply it to GoogleMapOptions so MapView is created with it. + // in googleMapOptionsFactory, apply it to GoogleMapOptions so MapView is created + // with it. "Not set" means the SDK default: 0 (MapColorScheme.LIGHT) up to + // play-services-maps 20.0.0, -1 from 20.1.0 on. // Lite mode does not support color schemes, and older Play services throw // UnsupportedOperationException for it, so it is never applied there (#1028). - val applyColorScheme = - mapColorScheme != null && baseOptions.mapColorScheme == 0 && !isLiteMode + val applyColorScheme = mapColorScheme != null && + baseOptions.mapColorScheme == GoogleMapOptions().mapColorScheme && + !isLiteMode val options = if (applyColorScheme) { baseOptions.mapColorScheme(mapColorScheme.value) } else {