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
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
activitycompose = "1.10.1"
activitycompose = "1.11.0"
agp = "8.13.0"
androidCore = "1.7.0"
androidx-core = "1.17.0"
Expand All @@ -11,7 +11,7 @@ gradleMavenPublishPlugin = "0.34.0"
jacoco-plugin = "0.2.1"
junit = "4.13.2"
junitktx = "1.3.0"
kotlin = "2.2.10"
kotlin = "2.2.20"
kotlinxCoroutines = "1.10.2"
leakcanaryAndroid = "2.14"
mapsecrets = "2.0.1"
Expand All @@ -22,7 +22,7 @@ screenshot = "0.0.1-alpha11"
constraintlayout = "2.2.1"
material = "1.13.0"
robolectric = "4.16"
truth = "1.4.4"
truth = "1.4.5"

[libraries]
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agp" }
Expand Down
15 changes: 11 additions & 4 deletions maps-app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
id("kotlin-android")
Expand All @@ -8,7 +10,7 @@ plugins {

android {
lint {
sarifOutput = file("$buildDir/reports/lint-results.sarif")
sarifOutput = layout.buildDirectory.file("reports/lint-results.sarif").get().asFile
}

buildTypes {
Expand Down Expand Up @@ -43,9 +45,14 @@ android {
compose = true
}

kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.addAll(
"-opt-in=kotlin.RequiresOptIn"
)
}
}

experimentalProperties["android.experimental.enableScreenshotTest"] = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ class AdvancedMarkersActivity : ComponentActivity(), OnMapsSdkInitializedCallbac
when (renderer) {
MapsInitializer.Renderer.LATEST -> Log.d("MapsDemo", "The latest version of the renderer is used.")
MapsInitializer.Renderer.LEGACY -> Log.d("MapsDemo", "The legacy version of the renderer is used.")
else -> {}
}
}
}
16 changes: 11 additions & 5 deletions maps-compose-utils/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("kotlin-android")
alias(libs.plugins.compose.compiler)
Expand All @@ -6,7 +8,7 @@ plugins {

android {
lint {
sarifOutput = file("$buildDir/reports/lint-results.sarif")
sarifOutput = layout.buildDirectory.file("reports/lint-results.sarif").get().asFile
}

namespace = "com.google.maps.android.compose.utils"
Expand All @@ -26,10 +28,14 @@ android {
compose = true
}

kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-Xexplicit-api=strict"
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.addAll(
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn"
)
}
}
}

Expand Down
18 changes: 11 additions & 7 deletions maps-compose-widgets/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("kotlin-android")
alias (libs.plugins.compose.compiler)
Expand All @@ -6,7 +8,7 @@ plugins {

android {
lint {
sarifOutput = file("$buildDir/reports/lint-results.sarif")
sarifOutput = layout.buildDirectory.file("reports/lint-results.sarif").get().asFile
}

namespace = "com.google.maps.android.compose.widgets"
Expand All @@ -26,12 +28,14 @@ android {
compose = true
}

kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += listOf(
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn"
)
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.addAll(
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn"
)
}
}
}

Expand Down
24 changes: 15 additions & 9 deletions maps-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.gradle.kotlin.dsl.sourceSets
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("org.jetbrains.kotlin.android")
Expand All @@ -8,7 +9,7 @@ plugins {

android {
lint {
sarifOutput = file("$buildDir/reports/lint-results.sarif")
sarifOutput = layout.buildDirectory.file("reports/lint-results.sarif").get().asFile
}

namespace = "com.google.maps.android.compose"
Expand All @@ -28,20 +29,24 @@ android {
compose = true
}

kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += listOf(
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn",
)
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.addAll(
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn"
)
}
}

sourceSets["main"].java.srcDir("build/generated/source/artifactId")
}

composeCompiler {
stabilityConfigurationFile =
layout.projectDirectory.file("compose_compiler_stability_config.conf")
stabilityConfigurationFiles.set(
listOf(layout.projectDirectory.file("compose_compiler_stability_config.conf"))
)

if (findProperty("composeCompilerReports") == "true") {
reportsDestination = layout.buildDirectory.dir("compose_compiler")
}
Expand All @@ -50,6 +55,7 @@ composeCompiler {
}
}


dependencies {
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.awaitCancellation
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext

/**
* A compose container for a [MapView].
Expand Down Expand Up @@ -170,7 +169,10 @@ public fun GoogleMap(
val componentCallbacks = object : ComponentCallbacks2 {
override fun onConfigurationChanged(newConfig: Configuration) {}

@Deprecated("Deprecated in Java", ReplaceWith("onTrimMemory(level)"))
@Deprecated(
"Deprecated in Java",
ReplaceWith("onTrimMemory(level)")
)
override fun onLowMemory() {
mapView.onLowMemory()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.compose.runtime.saveable.Saver
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshots.StateFactoryMarker
import androidx.compose.ui.UiComposable
import androidx.compose.ui.geometry.Offset
import com.google.android.gms.maps.model.AdvancedMarkerOptions
import com.google.android.gms.maps.model.BitmapDescriptor
Expand Down Expand Up @@ -337,7 +338,7 @@ public fun MarkerComposable(
onInfoWindowClick: (Marker) -> Unit = {},
onInfoWindowClose: (Marker) -> Unit = {},
onInfoWindowLongClick: (Marker) -> Unit = {},
content: @Composable () -> Unit,
content: @UiComposable @Composable () -> Unit,
) {
val icon = rememberComposeBitmapDescriptor(*keys) { content() }

Expand Down Expand Up @@ -411,7 +412,7 @@ public fun MarkerInfoWindow(
onInfoWindowClick: (Marker) -> Unit = {},
onInfoWindowClose: (Marker) -> Unit = {},
onInfoWindowLongClick: (Marker) -> Unit = {},
content: (@Composable (Marker) -> Unit)? = null
content: (@UiComposable @Composable (Marker) -> Unit)? = null
) {
MarkerImpl(
state = state,
Expand Down Expand Up @@ -484,8 +485,8 @@ public fun MarkerInfoWindowComposable(
onInfoWindowClick: (Marker) -> Unit = {},
onInfoWindowClose: (Marker) -> Unit = {},
onInfoWindowLongClick: (Marker) -> Unit = {},
infoContent: (@Composable (Marker) -> Unit)? = null,
content: @Composable () -> Unit,
infoContent: (@UiComposable @Composable (Marker) -> Unit)? = null,
content: @UiComposable @Composable () -> Unit,
) {
val icon = rememberComposeBitmapDescriptor(*keys) { content() }

Expand Down Expand Up @@ -557,7 +558,7 @@ public fun MarkerInfoWindowContent(
onInfoWindowClick: (Marker) -> Unit = {},
onInfoWindowClose: (Marker) -> Unit = {},
onInfoWindowLongClick: (Marker) -> Unit = {},
content: (@Composable (Marker) -> Unit)? = null
content: (@UiComposable @Composable (Marker) -> Unit)? = null
) {
MarkerImpl(
state = state,
Expand Down