From db2ea0a9ec0d59205242109f1e51206bd84e1aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Tue, 15 Oct 2024 17:34:03 +0200 Subject: [PATCH 1/6] chore: added lint report --- .github/workflows/lint-report.yml | 45 +++++++++++++++++++++++++++++++ maps-compose/build.gradle.kts | 3 +++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/lint-report.yml diff --git a/.github/workflows/lint-report.yml b/.github/workflows/lint-report.yml new file mode 100644 index 000000000..3f93bba59 --- /dev/null +++ b/.github/workflows/lint-report.yml @@ -0,0 +1,45 @@ +# 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. + +name: Lint and Upload SARIF + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '17' + + - name: Run Android Lint + run: ./gradlew lint + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: library/build/reports/lint-results.sarif diff --git a/maps-compose/build.gradle.kts b/maps-compose/build.gradle.kts index b0f424199..14c7cafcb 100644 --- a/maps-compose/build.gradle.kts +++ b/maps-compose/build.gradle.kts @@ -5,6 +5,9 @@ plugins { } android { + lint { + sarifOutput = file("$layout.buildDirectory/reports/lint-results.sarif") + } namespace = "com.google.maps.android.compose" compileSdk = 34 From afd12e425417a45bd1e2f9f09fe861d2eb6a0475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Tue, 15 Oct 2024 17:39:02 +0200 Subject: [PATCH 2/6] chore: get rid of deprecation --- maps-compose/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maps-compose/build.gradle.kts b/maps-compose/build.gradle.kts index 14c7cafcb..0d4e9c070 100644 --- a/maps-compose/build.gradle.kts +++ b/maps-compose/build.gradle.kts @@ -6,7 +6,7 @@ plugins { android { lint { - sarifOutput = file("$layout.buildDirectory/reports/lint-results.sarif") + sarifOutput = file("$buildDir/reports/lint-results.sarif") } namespace = "com.google.maps.android.compose" From 06f99754c57b1e607ff5c3e39f45586eb43b5eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Tue, 15 Oct 2024 17:44:17 +0200 Subject: [PATCH 3/6] chore: change path --- .github/workflows/lint-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-report.yml b/.github/workflows/lint-report.yml index 3f93bba59..934966375 100644 --- a/.github/workflows/lint-report.yml +++ b/.github/workflows/lint-report.yml @@ -42,4 +42,4 @@ jobs: - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v3 with: - sarif_file: library/build/reports/lint-results.sarif + sarif_file: maps-compose/build/reports/lint-results.sarif From 49105a1c3f19836b73171a57ad4c5ff0e2b1c430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Wed, 16 Oct 2024 09:30:24 +0200 Subject: [PATCH 4/6] chore: merging lint reports --- .github/workflows/lint-report.yml | 4 ++++ app/build.gradle.kts | 4 ++++ maps-compose-utils/build.gradle.kts | 4 ++++ maps-compose-widgets/build.gradle.kts | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/lint-report.yml b/.github/workflows/lint-report.yml index 934966375..8886e4bf7 100644 --- a/.github/workflows/lint-report.yml +++ b/.github/workflows/lint-report.yml @@ -39,6 +39,10 @@ jobs: - name: Run Android Lint run: ./gradlew lint + - name: Merge SARIF files + run: | + jq -s '{ "$schema": "https://json.schemastore.org/sarif-2.1.0", "version": "2.1.0", "runs": map(.runs) | add }' maps-compose/build/reports/lint-results.sarif maps-compose-utils/build/reports/lint-results.sarif maps-compose-widgets/build/reports/lint-results.sarif app/build/reports/lint-results.sarif > merged.sarif + - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v3 with: diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d85f5d18a..f588d862d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,6 +6,10 @@ plugins { } android { + lint { + sarifOutput = file("$buildDir/reports/lint-results.sarif") + } + buildTypes { getByName("debug") { enableUnitTestCoverage = true diff --git a/maps-compose-utils/build.gradle.kts b/maps-compose-utils/build.gradle.kts index fbbc0b2bd..019112701 100644 --- a/maps-compose-utils/build.gradle.kts +++ b/maps-compose-utils/build.gradle.kts @@ -5,6 +5,10 @@ plugins { } android { + lint { + sarifOutput = file("$buildDir/reports/lint-results.sarif") + } + namespace = "com.google.maps.android.compose.utils" compileSdk = 34 diff --git a/maps-compose-widgets/build.gradle.kts b/maps-compose-widgets/build.gradle.kts index f39e40d0a..66aaa3506 100644 --- a/maps-compose-widgets/build.gradle.kts +++ b/maps-compose-widgets/build.gradle.kts @@ -5,6 +5,10 @@ plugins { } android { + lint { + sarifOutput = file("$buildDir/reports/lint-results.sarif") + } + namespace = "com.google.maps.android.compose.widgets" compileSdk = 34 From ad35512b40675259050f57f1519cf3a7a1a464ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Wed, 16 Oct 2024 09:44:52 +0200 Subject: [PATCH 5/6] chore: upload merged file --- .github/workflows/lint-report.yml | 2 +- maps-compose-widgets/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-report.yml b/.github/workflows/lint-report.yml index 8886e4bf7..c1a2124a7 100644 --- a/.github/workflows/lint-report.yml +++ b/.github/workflows/lint-report.yml @@ -46,4 +46,4 @@ jobs: - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v3 with: - sarif_file: maps-compose/build/reports/lint-results.sarif + sarif_file: merged.sarif diff --git a/maps-compose-widgets/build.gradle.kts b/maps-compose-widgets/build.gradle.kts index 66aaa3506..3884970f6 100644 --- a/maps-compose-widgets/build.gradle.kts +++ b/maps-compose-widgets/build.gradle.kts @@ -8,7 +8,7 @@ android { lint { sarifOutput = file("$buildDir/reports/lint-results.sarif") } - + namespace = "com.google.maps.android.compose.widgets" compileSdk = 34 From 8eb25edb5fc1322619309cf291806661e14b137e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Lo=CC=81pez=20Man=CC=83as?= Date: Wed, 16 Oct 2024 09:57:12 +0200 Subject: [PATCH 6/6] chore: fixed warnings --- .../compose/markerexamples/AdvancedMarkersActivity.kt | 2 ++ app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 4 +++- .../main/res/mipmap-anydpi-v26/ic_launcher_round.xml | 10 +++++++--- gradle/libs.versions.toml | 2 +- gradle/wrapper/gradle-wrapper.properties | 3 ++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt b/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt index a78ee674e..3683e7a99 100644 --- a/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt +++ b/app/src/main/java/com/google/maps/android/compose/markerexamples/AdvancedMarkersActivity.kt @@ -16,6 +16,7 @@ package com.google.maps.android.compose.markerexamples import android.R.drawable.ic_menu_myplaces +import android.annotation.SuppressLint import android.graphics.Color import android.os.Bundle import android.util.Log @@ -56,6 +57,7 @@ private val center = LatLng(-18.000, -58.000) private val defaultCameraPosition1 = CameraPosition.fromLatLngZoom(center, 2f) class AdvancedMarkersActivity : ComponentActivity(), OnMapsSdkInitializedCallback { + @SuppressLint("SetTextI18n") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) MapsInitializer.initialize(applicationContext, MapsInitializer.Renderer.LATEST, this) diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7f17c2d54..127e1a1de 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -15,7 +15,9 @@ limitations under the License. --> - + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 7f17c2d54..8cf400e42 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -15,7 +15,11 @@ limitations under the License. --> - - - + + + \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1255e74d2..57130c28b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] activitycompose = "1.9.2" -agp = "8.4.2" +agp = "8.7.1" androidxtest = "1.6.1" compose-bom = "2024.09.02" dokka = "1.9.20" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22ce5..6b3b76b73 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ +#Wed Oct 16 09:55:51 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME