Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class GoogleMapViewTests {
)
}
assertThat(capturedOptions?.liteMode).isTrue()
assertThat(capturedOptions?.mapColorScheme).isEqualTo(MapColorScheme.LIGHT)
assertThat(capturedOptions?.mapColorScheme).isEqualTo(GoogleMapOptions().mapColorScheme)
}

@Test
Expand All @@ -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
Expand All @@ -224,7 +224,7 @@ class GoogleMapViewTests {
)
}
assertThat(capturedOptions?.liteMode).isTrue()
assertThat(capturedOptions?.mapColorScheme).isEqualTo(MapColorScheme.LIGHT)
assertThat(capturedOptions?.mapColorScheme).isEqualTo(GoogleMapOptions().mapColorScheme)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading