Skip to content

Commit afb9f1e

Browse files
authored
chore: dependencies updated (#1413)
* chore: dependencies updated * chore: added header * chore: added header * chore: updated flows * chore: dependencies updated * chore: changed permission * chore: moved jacoco to independent flow * chore: moved jacoco to independent flow * chore: header * chore: set permission
1 parent edb4fac commit afb9f1e

File tree

10 files changed

+163
-57
lines changed

10 files changed

+163
-57
lines changed

.github/workflows/dependabot.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ on: pull_request
1717

1818
permissions:
1919
contents: write
20-
20+
pull-requests: write
21+
2122
jobs:
2223
test:
2324
uses: ./.github/workflows/test.yml

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
steps:
3030
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3131
- name: Checkout Repo
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3333

3434
- name: Gradle Wrapper Validation
35-
uses: gradle/wrapper-validation[email protected]
35+
uses: gradle/actions/wrapper-validation@v4
3636

3737
- name: Set up JDK 17
3838
uses: actions/[email protected]

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
with:
2828
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
2929
- name: Set up JDK 17
@@ -56,7 +56,7 @@ jobs:
5656
node-version: '14'
5757

5858
- name: Semantic Release
59-
uses: cycjimmy/semantic-release-action@v3.4.1
59+
uses: cycjimmy/semantic-release-action@v4.1.1
6060
with:
6161
extra_plugins: |
6262
"@semantic-release/[email protected]"

.github/workflows/report.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# A workflow that runs tests on every new pull request
16+
name: Run unit tests
17+
18+
on:
19+
repository_dispatch:
20+
types: [test]
21+
push:
22+
branches-ignore: ['gh-pages']
23+
pull_request:
24+
branches-ignore: ['gh-pages']
25+
workflow_dispatch:
26+
workflow_call:
27+
28+
jobs:
29+
test:
30+
runs-on: ubuntu-latest
31+
permissions:
32+
pull-requests: write
33+
steps:
34+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
35+
- name: Checkout Repo
36+
uses: actions/checkout@v4
37+
38+
- name: Gradle Wrapper Validation
39+
uses: gradle/actions/wrapper-validation@v4
40+
41+
- name: Set up JDK 17
42+
uses: actions/[email protected]
43+
with:
44+
java-version: '17'
45+
distribution: 'temurin'
46+
47+
- name: Build modules
48+
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
49+
50+
- name: Jacoco Report to PR
51+
id: jacoco
52+
uses: madrapps/[email protected]
53+
with:
54+
paths: |
55+
${{ github.workspace }}/library/build/jacoco/jacoco.xml
56+
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
57+
min-coverage-overall: 26
58+
min-coverage-changed-files: 60
59+
title: Code Coverage
60+
debug-mode: false
61+
update-comment: true

.github/workflows/test.yml

+3-16
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
steps:
3434
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3535
- name: Checkout Repo
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737

3838
- name: Gradle Wrapper Validation
39-
uses: gradle/wrapper-validation[email protected]
39+
uses: gradle/actions/wrapper-validation@v4
4040

4141
- name: Set up JDK 17
4242
uses: actions/[email protected]
@@ -45,17 +45,4 @@ jobs:
4545
distribution: 'temurin'
4646

4747
- name: Build modules
48-
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
49-
50-
- name: Jacoco Report to PR
51-
id: jacoco
52-
uses: madrapps/[email protected]
53-
with:
54-
paths: |
55-
${{ github.workspace }}/library/build/jacoco/jacoco.xml
56-
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
57-
min-coverage-overall: 26
58-
min-coverage-changed-files: 60
59-
title: Code Coverage
60-
debug-mode: false
61-
update-comment: true
48+
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace

build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
buildscript {
18-
ext.kotlin_version = '2.0.0'
18+
ext.kotlin_version = '2.0.21'
1919
repositories {
2020
google()
2121
mavenCentral()
@@ -24,11 +24,11 @@ buildscript {
2424
}
2525
}
2626
dependencies {
27-
classpath 'com.android.tools.build:gradle:8.7.0'
28-
classpath 'com.mxalbert.gradle:jacoco-android:0.2.1'
29-
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
30-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
31-
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.9.20"
27+
classpath libs.gradle
28+
classpath libs.jacoco.android
29+
classpath libs.secrets.gradle.plugin
30+
classpath libs.kotlin.gradle.plugin
31+
classpath libs.dokka.gradle.plugin
3232
}
3333
}
3434

demo/build.gradle

+10-11
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ android {
2626
}
2727

2828
defaultConfig {
29-
compileSdk 34
29+
compileSdk 35
3030
applicationId "com.google.maps.android.utils.demo"
3131
minSdkVersion 21
32-
targetSdkVersion 34
32+
targetSdkVersion 35
3333
versionCode 1
3434
versionName "1.0"
3535
}
@@ -56,16 +56,15 @@ dependencies {
5656
// [START_EXCLUDE silent]
5757
implementation project(':library')
5858

59-
implementation 'androidx.appcompat:appcompat:1.7.0'
60-
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
59+
implementation(libs.appcompat)
60+
implementation(libs.lifecycle.extensions)
61+
implementation(libs.lifecycle.viewmodel.ktx)
62+
implementation(libs.kotlin.stdlib.jdk8)
63+
implementation(libs.kotlinx.coroutines.android)
64+
implementation(libs.kotlinx.coroutines.core)
6165

62-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6"
63-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
64-
65-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
66-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1'
67-
testImplementation("junit:junit:4.13.2")
68-
testImplementation("com.google.truth:truth:1.4.2")
66+
testImplementation(libs.junit)
67+
testImplementation(libs.truth)
6968
// [END_EXCLUDE]
7069
}
7170
// [END maps_android_utils_install_snippet]

gradle/libs.versions.toml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[versions]
2+
appcompat = "1.7.0"
3+
dokka-gradle-plugin = "1.9.20"
4+
gradle = "8.7.2"
5+
jacoco-android = "0.2.1"
6+
lifecycle-extensions = "2.2.0"
7+
lifecycle-viewmodel-ktx = "2.8.7"
8+
kotlin = "2.0.21"
9+
kotlinx-coroutines = "1.9.0"
10+
junit = "4.13.2"
11+
secrets-gradle-plugin = "2.0.1"
12+
truth = "1.4.2"
13+
play-services-maps = "19.0.0"
14+
core-ktx = "1.15.0"
15+
robolectric = "4.12.2"
16+
kxml2 = "2.3.0"
17+
mockk = "1.13.11"
18+
lint = "31.7.2"
19+
20+
[libraries]
21+
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
22+
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka-gradle-plugin" }
23+
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
24+
jacoco-android = { module = "com.mxalbert.gradle:jacoco-android", version.ref = "jacoco-android" }
25+
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
26+
lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycle-extensions" }
27+
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle-viewmodel-ktx" }
28+
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
29+
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
30+
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
31+
junit = { module = "junit:junit", version.ref = "junit" }
32+
secrets-gradle-plugin = { module = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin", version.ref = "secrets-gradle-plugin" }
33+
truth = { module = "com.google.truth:truth", version.ref = "truth" }
34+
play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "play-services-maps" }
35+
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
36+
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
37+
kxml2 = { module = "net.sf.kxml:kxml2", version.ref = "kxml2" }
38+
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
39+
lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" }
40+
lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "lint" }
41+
lint = { module = "com.android.tools.lint:lint", version.ref = "lint" }
42+
lint-tests = { module = "com.android.tools.lint:lint-tests", version.ref = "lint" }
43+
testutils = { module = "com.android.tools:testutils", version.ref = "lint" }

library/build.gradle

+11-11
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ android {
2727
sarifOutput = file("$buildDir/reports/lint-results.sarif")
2828
}
2929
defaultConfig {
30-
compileSdk 34
30+
compileSdk 35
3131
minSdkVersion 21
32-
targetSdkVersion 34
32+
targetSdkVersion 35
3333
versionCode 1
3434
versionName "1.0"
3535
consumerProguardFiles 'consumer-rules.pro'
@@ -66,16 +66,16 @@ android {
6666

6767
dependencies {
6868
// We are adding api() for the Maps SDK for Android, so it propagates to the app-level modules.
69-
api 'com.google.android.gms:play-services-maps:19.0.0'
70-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
71-
implementation 'androidx.appcompat:appcompat:1.7.0'
72-
implementation 'androidx.core:core-ktx:1.13.1'
69+
api(libs.play.services.maps)
70+
implementation(libs.kotlinx.coroutines.android)
71+
implementation(libs.appcompat)
72+
implementation(libs.core.ktx)
7373
lintPublish project(':lint-checks')
74-
testImplementation 'junit:junit:4.13.2'
75-
testImplementation 'org.robolectric:robolectric:4.12.2'
76-
testImplementation 'net.sf.kxml:kxml2:2.3.0'
77-
testImplementation "io.mockk:mockk:1.13.11"
78-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
74+
testImplementation(libs.junit)
75+
testImplementation(libs.robolectric)
76+
testImplementation(libs.kxml2)
77+
testImplementation(libs.mockk)
78+
implementation(libs.kotlin.stdlib.jdk8)
7979
}
8080

8181
tasks.register('instrumentTest') { dependsOn connectedCheck }

lint-checks/build.gradle

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright 2024 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
apply plugin: 'java-library'
218
apply plugin: 'kotlin'
319
apply plugin: 'com.android.lint'
@@ -11,14 +27,13 @@ lintOptions {
1127
}
1228

1329
dependencies {
14-
compileOnly "com.android.tools.lint:lint-api:31.4.1"
15-
compileOnly "com.android.tools.lint:lint-checks:31.4.1"
16-
// compileOnly "com.android.tools.lint:manifest-merger:31.1.0"
17-
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
18-
testImplementation "junit:junit:4.13.2"
19-
testImplementation "com.android.tools.lint:lint:31.4.1"
20-
testImplementation "com.android.tools.lint:lint-tests:31.4.1"
21-
testImplementation "com.android.tools:testutils:31.4.1"
30+
compileOnly(libs.lint.api)
31+
compileOnly(libs.lint.checks)
32+
compileOnly(libs.kotlin.stdlib.jdk8)
33+
testImplementation(libs.junit)
34+
testImplementation(libs.lint)
35+
testImplementation(libs.lint.tests)
36+
testImplementation(libs.testutils)
2237
}
2338

2439
jar {

0 commit comments

Comments
 (0)