From 9402421929e973d547d03208ad46bafbd5e46363 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 6 Nov 2023 15:07:46 +0100 Subject: [PATCH 1/3] Let lint analysis the module :appconfig. We had this warning: Lint will treat :appconfig as an external dependency and not analyze it. * Recommended Action: Apply the 'com.android.lint' plugin to java library project :appconfig. to enable lint to analyze those sources. --- appconfig/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/appconfig/build.gradle.kts b/appconfig/build.gradle.kts index 3f9275d383..853a775b45 100644 --- a/appconfig/build.gradle.kts +++ b/appconfig/build.gradle.kts @@ -15,6 +15,7 @@ */ plugins { id("java-library") + id("com.android.lint") alias(libs.plugins.kotlin.jvm) alias(libs.plugins.anvil) alias(libs.plugins.ksp) From 12ca31282e9a349bddcb6adf777ce78fa4432399 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 6 Nov 2023 15:21:54 +0100 Subject: [PATCH 2/3] Remove dependency on material library. --- gradle/libs.versions.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7a6cc29913..f129d27997 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -61,7 +61,6 @@ junit = "4.13.2" androidx-test-ext-junit = "1.1.5" espresso-core = "3.5.1" appcompat = "1.6.1" -material = "1.9.0" [libraries] # Project @@ -196,7 +195,6 @@ junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" } espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" } appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } -material = { group = "com.google.android.material", name = "material", version.ref = "material" } [bundles] From 5de8841d96925be86bea7ec5429f9f6df7e16b22 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 6 Nov 2023 16:02:10 +0100 Subject: [PATCH 3/3] Upgrade lint to version 8.3.0-alpha11 and suppress false positive. --- .../kotlin/io/element/android/features/location/api/Location.kt | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/Location.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/Location.kt index 8d801b37a8..b8377b7ef0 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/Location.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/Location.kt @@ -16,11 +16,13 @@ package io.element.android.features.location.api +import android.annotation.SuppressLint import android.os.Parcelable import kotlinx.parcelize.Parcelize private const val GEO_URI_REGEX = """geo:(?-?\d+(?:\.\d+)?),(?-?\d+(?:\.\d+)?)(?:;u=(?\d+(?:\.\d+)?))?""" +@SuppressLint("NewApi") @Parcelize data class Location( val lat: Double, diff --git a/gradle.properties b/gradle.properties index c3bed82074..cf609500c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -49,7 +49,7 @@ signing.element.nightly.keyPassword=Secret # Customise the Lint version to use a more recent version than the one bundled with AGP # https://googlesamples.github.io/android-custom-lint-rules/usage/newer-lint.md.html -android.experimental.lint.version=8.2.0-alpha02 +android.experimental.lint.version=8.3.0-alpha11 # Enable test fixture for all modules by default android.experimental.enableTestFixtures=true