Skip to content

Commit b3902e9

Browse files
kikosodkhawk
andauthored
build: libraries updated (#745)
* build: libraries updated * build: updated screenshot config * build: updated Compose BoM * build: updated Compose BoM * build: excluding tasks we might not need * build: jacoco command on singleline * build: change artifact name --------- Co-authored-by: Dale Hawkins <[email protected]>
1 parent 5de1d60 commit b3902e9

File tree

16 files changed

+32
-27
lines changed

16 files changed

+32
-27
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
distribution: 'temurin'
4343

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

4747
- name: Run Screenshot Tests
4848
run: ./gradlew validateDebugScreenshotTest
@@ -51,5 +51,5 @@ jobs:
5151
uses: actions/upload-artifact@v4
5252
if: always()
5353
with:
54-
name: my-artifact
54+
name: screenshot-report
5555
path: maps-app/build/reports

gradle/libs.versions.toml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
[versions]
22
activitycompose = "1.10.1"
3-
agp = "8.10.1"
4-
androidCore = "1.6.1"
5-
androidx-core = "1.16.0"
6-
androidxtest = "1.6.2"
7-
compose-bom = "2025.04.00"
3+
agp = "8.12.1"
4+
androidCore = "1.7.0"
5+
androidx-core = "1.17.0"
6+
androidxtest = "1.7.0"
7+
compose-bom = "2025.08.01"
88
dokka = "2.0.0"
9-
espresso = "3.6.1"
9+
espresso = "3.7.0"
1010
gradleMavenPublishPlugin = "0.34.0"
1111
jacoco-plugin = "0.2.1"
1212
junit = "4.13.2"
13-
junitktx = "1.2.1"
14-
kotlin = "2.2.0"
13+
junitktx = "1.3.0"
14+
kotlin = "2.2.10"
1515
kotlinxCoroutines = "1.10.2"
16-
leakcanaryAndroid = "2.12"
16+
leakcanaryAndroid = "2.14"
1717
mapsecrets = "2.0.1"
1818
mapsktx = "5.2.0"
19-
org-jacoco-core = "0.8.12"
20-
screenshot = "0.0.1-alpha10"
19+
org-jacoco-core = "0.8.13"
20+
screenshot = "0.0.1-alpha11"
2121
constraintlayout = "2.2.1"
2222
material = "1.12.0"
2323

@@ -52,6 +52,7 @@ org-jacoco-core = { module = "org.jacoco:org.jacoco.core", version.ref = "org-ja
5252
test-junit = { module = "junit:junit", version.ref = "junit" }
5353
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
5454
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
55+
screenshot-validation-api = { group = "com.android.tools.screenshot", name = "screenshot-validation-api", version.ref = "screenshot" }
5556

5657
[plugins]
5758
android-application = { id = "com.android.application", version.ref = "agp" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum

maps-app/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ android {
2323
}
2424

2525
namespace = "com.google.maps.android.compose"
26-
compileSdk = 35
26+
compileSdk = 36
2727

2828
defaultConfig {
2929
minSdk = 21
30-
targetSdk = 35
30+
targetSdk = 36
3131
versionCode = 1
3232
versionName = "1.0"
3333
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -67,6 +67,7 @@ dependencies {
6767
implementation(libs.androidx.compose.ui.preview.tooling)
6868
implementation(libs.androidx.constraintlayout)
6969
implementation(libs.material)
70+
implementation(libs.screenshot.validation.api)
7071
debugImplementation(libs.androidx.compose.ui.tooling)
7172
debugImplementation(libs.leakcanary.android)
7273

-2.77 KB
Binary file not shown.
-2.77 KB
Binary file not shown.

maps-app/src/main/java/com/google/maps/android/compose/BasicMapActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ import androidx.compose.ui.graphics.Color
5858
import androidx.compose.ui.graphics.toArgb
5959
import androidx.compose.ui.platform.testTag
6060
import androidx.compose.ui.text.style.TextAlign
61-
import androidx.compose.ui.tooling.preview.Preview
6261
import androidx.compose.ui.unit.dp
62+
import com.android.tools.screenshot.PreviewTest
6363
import com.google.android.gms.maps.CameraUpdateFactory
6464
import com.google.android.gms.maps.model.BitmapDescriptorFactory
6565
import com.google.android.gms.maps.model.CameraPosition
@@ -433,7 +433,7 @@ private fun DebugView(
433433
}
434434

435435

436-
@Preview
436+
@PreviewTest
437437
@Composable
438438
fun GoogleMapViewPreview() {
439439
MapsComposeSampleTheme {

maps-app/src/main/java/com/google/maps/android/compose/ScaleBarActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import androidx.compose.runtime.remember
3838
import androidx.compose.runtime.setValue
3939
import androidx.compose.ui.Alignment
4040
import androidx.compose.ui.Modifier
41-
import androidx.compose.ui.tooling.preview.Preview
4241
import androidx.compose.ui.unit.dp
42+
import com.android.tools.screenshot.PreviewTest
4343
import com.google.android.gms.maps.model.CameraPosition
4444
import com.google.android.gms.maps.model.LatLng
4545
import com.google.maps.android.compose.theme.MapsComposeSampleTheme
@@ -133,7 +133,7 @@ class ScaleBarActivity : ComponentActivity() {
133133
}
134134
}
135135

136-
@Preview
136+
@PreviewTest
137137
@Composable
138138
fun PreviewScaleBar() {
139139
val cameraPositionState = remember {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<manifest package="com.google.maps.android.compose" />

0 commit comments

Comments
 (0)