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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
distribution: 'temurin'

- name: Build modules
run: ./gradlew build jacocoTestReport --stacktrace
run: ./gradlew build jacocoTestReport -x :maps-app:generateDebugScreenshotTestConfig -x :maps-app:testDebugScreenshotTest -x :maps-app:generateReleaseScreenshotTestConfig -x :maps-app:testReleaseScreenshotTest --stacktrace

- name: Run Screenshot Tests
run: ./gradlew validateDebugScreenshotTest
Expand All @@ -51,5 +51,5 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: my-artifact
name: screenshot-report
path: maps-app/build/reports
23 changes: 12 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[versions]
activitycompose = "1.10.1"
agp = "8.10.1"
androidCore = "1.6.1"
androidx-core = "1.16.0"
androidxtest = "1.6.2"
compose-bom = "2025.04.00"
agp = "8.12.1"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.application than 8.12.1 is available: 8.13.0. (There is also a newer version of 8.12.𝑥 available, if upgrading to 8.13.0 is difficult: 8.12.2)

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.tools.build:gradle than 8.12.1 is available: 8.13.0. (There is also a newer version of 8.12.𝑥 available, if upgrading to 8.13.0 is difficult: 8.12.2)
androidCore = "1.7.0"
androidx-core = "1.17.0"
androidxtest = "1.7.0"
compose-bom = "2025.08.01"
dokka = "2.0.0"
espresso = "3.6.1"
espresso = "3.7.0"
gradleMavenPublishPlugin = "0.34.0"
jacoco-plugin = "0.2.1"
junit = "4.13.2"
junitktx = "1.2.1"
kotlin = "2.2.0"
junitktx = "1.3.0"
kotlin = "2.2.10"
kotlinxCoroutines = "1.10.2"
leakcanaryAndroid = "2.12"
leakcanaryAndroid = "2.14"
mapsecrets = "2.0.1"
mapsktx = "5.2.0"
org-jacoco-core = "0.8.12"
screenshot = "0.0.1-alpha10"
org-jacoco-core = "0.8.13"
screenshot = "0.0.1-alpha11"
constraintlayout = "2.2.1"
material = "1.12.0"

Expand Down Expand Up @@ -52,6 +52,7 @@
test-junit = { module = "junit:junit", version.ref = "junit" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
screenshot-validation-api = { group = "com.android.tools.screenshot", name = "screenshot-validation-api", version.ref = "screenshot" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
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-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
5 changes: 3 additions & 2 deletions maps-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ android {
}

namespace = "com.google.maps.android.compose"
compileSdk = 35
compileSdk = 36

defaultConfig {
minSdk = 21
targetSdk = 35
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -67,6 +67,7 @@ dependencies {
implementation(libs.androidx.compose.ui.preview.tooling)
implementation(libs.androidx.constraintlayout)
implementation(libs.material)
implementation(libs.screenshot.validation.api)
debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.leakcanary.android)

Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.android.tools.screenshot.PreviewTest
import com.google.android.gms.maps.CameraUpdateFactory
import com.google.android.gms.maps.model.BitmapDescriptorFactory
import com.google.android.gms.maps.model.CameraPosition
Expand Down Expand Up @@ -433,7 +433,7 @@ private fun DebugView(
}


@Preview
@PreviewTest
@Composable
fun GoogleMapViewPreview() {
MapsComposeSampleTheme {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.android.tools.screenshot.PreviewTest
import com.google.android.gms.maps.model.CameraPosition
import com.google.android.gms.maps.model.LatLng
import com.google.maps.android.compose.theme.MapsComposeSampleTheme
Expand Down Expand Up @@ -133,7 +133,7 @@ class ScaleBarActivity : ComponentActivity() {
}
}

@Preview
@PreviewTest
@Composable
fun PreviewScaleBar() {
val cameraPositionState = remember {
Expand Down
1 change: 1 addition & 0 deletions maps-app/src/screenshotTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest package="com.google.maps.android.compose" />
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.android.tools.screenshot.PreviewTest
import com.google.android.gms.maps.model.CameraPosition
import com.google.android.gms.maps.model.LatLng
import com.google.maps.android.compose.theme.MapsComposeSampleTheme
Expand All @@ -14,7 +15,8 @@ import com.google.maps.android.compose.widgets.ScaleBar


class ScaleBarTest() {
@Preview
@PreviewTest
@Preview(showBackground = true)
@Composable
fun PreviewScaleBar() {
val cameraPositionState = remember {
Expand All @@ -36,7 +38,8 @@ class ScaleBarTest() {
}
}

@Preview
@PreviewTest
@Preview(showBackground = true)
@Composable
fun PreviewDisappearingScaleBar() {
val cameraPositionState = remember {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion maps-compose-utils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
}

namespace = "com.google.maps.android.compose.utils"
compileSdk = 35
compileSdk = 36

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion maps-compose-widgets/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
}

namespace = "com.google.maps.android.compose.widgets"
compileSdk = 35
compileSdk = 36

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion maps-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
}

namespace = "com.google.maps.android.compose"
compileSdk = 35
compileSdk = 36

defaultConfig {
minSdk = 21
Expand Down
Loading