Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: dependencies updated #1413

Merged
merged 10 commits into from
Nov 4, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ on: pull_request

permissions:
contents: write

pull-requests: write

jobs:
test:
uses: ./.github/workflows/test.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Set up JDK 17
uses: actions/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation[email protected]
- uses: gradle/actions/wrapper-validation@v4
- name: Create .gpg key
run: |
echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc
Expand All @@ -56,7 +56,7 @@ jobs:
node-version: '14'

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3.4.1
uses: cycjimmy/semantic-release-action@v4.1.1
with:
extra_plugins: |
"@semantic-release/[email protected]"
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# A workflow that runs tests on every new pull request
name: Run unit tests

on:
repository_dispatch:
types: [test]
push:
branches-ignore: ['gh-pages']
pull_request:
branches-ignore: ['gh-pages']
workflow_dispatch:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'

- name: Build modules
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace

- name: Jacoco Report to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/library/build/jacoco/jacoco.xml
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
min-coverage-overall: 26
min-coverage-changed-files: 60
title: Code Coverage
debug-mode: false
update-comment: true
19 changes: 3 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Set up JDK 17
uses: actions/[email protected]
Expand All @@ -45,17 +45,4 @@ jobs:
distribution: 'temurin'

- name: Build modules
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace

- name: Jacoco Report to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/library/build/jacoco/jacoco.xml
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
min-coverage-overall: 26
min-coverage-changed-files: 60
title: Code Coverage
debug-mode: false
update-comment: true
run: ./gradlew build jacocoTestDebugUnitTestReport --stacktrace
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

buildscript {
ext.kotlin_version = '2.0.0'
ext.kotlin_version = '2.0.21'
repositories {
google()
mavenCentral()
Expand All @@ -24,11 +24,11 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.0'
classpath 'com.mxalbert.gradle:jacoco-android:0.2.1'
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.9.20"
classpath libs.gradle
classpath libs.jacoco.android
classpath libs.secrets.gradle.plugin
classpath libs.kotlin.gradle.plugin
classpath libs.dokka.gradle.plugin
}
}

Expand Down
21 changes: 10 additions & 11 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ plugins {
android {

defaultConfig {
compileSdk 34
compileSdk 35
applicationId "com.google.maps.android.utils.demo"
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
}
Expand All @@ -53,16 +53,15 @@ dependencies {
// [START_EXCLUDE silent]
implementation project(':library')

implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation(libs.appcompat)
implementation(libs.lifecycle.extensions)
implementation(libs.lifecycle.viewmodel.ktx)
implementation(libs.kotlin.stdlib.jdk8)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.coroutines.core)

implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1'
testImplementation("junit:junit:4.13.2")
testImplementation("com.google.truth:truth:1.4.2")
testImplementation(libs.junit)
testImplementation(libs.truth)
// [END_EXCLUDE]
}
// [END maps_android_utils_install_snippet]
Expand Down
43 changes: 43 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[versions]
appcompat = "1.7.0"
dokka-gradle-plugin = "1.9.20"
gradle = "8.7.2"
jacoco-android = "0.2.1"
lifecycle-extensions = "2.2.0"
lifecycle-viewmodel-ktx = "2.8.7"
kotlin = "2.0.21"
kotlinx-coroutines = "1.9.0"
junit = "4.13.2"
secrets-gradle-plugin = "2.0.1"
truth = "1.4.2"
play-services-maps = "19.0.0"
core-ktx = "1.15.0"
robolectric = "4.12.2"
kxml2 = "2.3.0"
mockk = "1.13.11"
lint = "31.7.2"

[libraries]
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka-gradle-plugin" }
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
jacoco-android = { module = "com.mxalbert.gradle:jacoco-android", version.ref = "jacoco-android" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycle-extensions" }
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle-viewmodel-ktx" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
junit = { module = "junit:junit", version.ref = "junit" }
secrets-gradle-plugin = { module = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin", version.ref = "secrets-gradle-plugin" }
truth = { module = "com.google.truth:truth", version.ref = "truth" }
play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "play-services-maps" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
kxml2 = { module = "net.sf.kxml:kxml2", version.ref = "kxml2" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" }
lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "lint" }
lint = { module = "com.android.tools.lint:lint", version.ref = "lint" }
lint-tests = { module = "com.android.tools.lint:lint-tests", version.ref = "lint" }
testutils = { module = "com.android.tools:testutils", version.ref = "lint" }
22 changes: 11 additions & 11 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ dokkaHtml {
android {

defaultConfig {
compileSdk 34
compileSdk 35
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName "1.0"
consumerProguardFiles 'consumer-rules.pro'
Expand Down Expand Up @@ -64,16 +64,16 @@ android {

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

tasks.register('instrumentTest') { dependsOn connectedCheck }
Expand Down
31 changes: 23 additions & 8 deletions lint-checks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2024 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'com.android.lint'
Expand All @@ -11,14 +27,13 @@ lintOptions {
}

dependencies {
compileOnly "com.android.tools.lint:lint-api:31.4.1"
compileOnly "com.android.tools.lint:lint-checks:31.4.1"
// compileOnly "com.android.tools.lint:manifest-merger:31.1.0"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testImplementation "junit:junit:4.13.2"
testImplementation "com.android.tools.lint:lint:31.4.1"
testImplementation "com.android.tools.lint:lint-tests:31.4.1"
testImplementation "com.android.tools:testutils:31.4.1"
compileOnly(libs.lint.api)
compileOnly(libs.lint.checks)
compileOnly(libs.kotlin.stdlib.jdk8)
testImplementation(libs.junit)
testImplementation(libs.lint)
testImplementation(libs.lint.tests)
testImplementation(libs.testutils)
}

jar {
Expand Down
Loading