Add Vendor information to bundled lint checks
Bug: 189211535
Test: presubmit
Change-Id: I5efd49480097ad64076a5ece9b086d3860b8506e
diff --git a/activity/activity-lint/build.gradle b/activity/activity-lint/build.gradle
index 5e00727..282ac60 100644
--- a/activity/activity-lint/build.gradle
+++ b/activity/activity-lint/build.gradle
@@ -23,7 +23,8 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidBuilderModel)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.kotlinStdlib)
testImplementation(libs.kotlinStdlib)
diff --git a/activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt b/activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
index 1a23b1a..60f497b 100644
--- a/activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
+++ b/activity/activity-lint/src/main/java/androidx/activity/lint/ActivityIssueRegistry.kt
@@ -14,9 +14,12 @@
* limitations under the License.
*/
+@file:Suppress("UnstableApiUsage")
+
package androidx.activity.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
/**
@@ -29,4 +32,8 @@
override val issues get() = listOf(
ActivityResultFragmentVersionDetector.ISSUE
)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=527362"
+ )
}
diff --git a/activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt b/activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
index 212284f..4e977bd 100644
--- a/activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
+++ b/activity/activity-lint/src/test/java/androidx/activity/lint/ApiLintVersionsTest.kt
@@ -35,6 +35,6 @@
assertThat(registry.api).isEqualTo(CURRENT_API)
// Intentionally fails in IDE, because we use different API version in
// studio and command line
- assertThat(registry.minApi).isEqualTo(8)
+ assertThat(registry.minApi).isEqualTo(10)
}
}
diff --git a/annotation/annotation-experimental-lint/build.gradle b/annotation/annotation-experimental-lint/build.gradle
index 517db7f..37fc54f 100644
--- a/annotation/annotation-experimental-lint/build.gradle
+++ b/annotation/annotation-experimental-lint/build.gradle
@@ -31,7 +31,7 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.kotlinStdlib)
testImplementation(libs.kotlinStdlib)
diff --git a/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalIssueRegistry.kt b/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalIssueRegistry.kt
index 93cbde7..bbd3b0f 100644
--- a/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalIssueRegistry.kt
+++ b/annotation/annotation-experimental-lint/src/main/java/androidx/annotation/experimental/lint/ExperimentalIssueRegistry.kt
@@ -14,13 +14,20 @@
* limitations under the License.
*/
+@file:Suppress("UnstableApiUsage")
+
package androidx.annotation.experimental.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
class ExperimentalIssueRegistry : IssueRegistry() {
override val minApi = CURRENT_API
override val api = 10
override val issues get() = ExperimentalDetector.ISSUES + AnnotationRetentionDetector.ISSUE
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=459778"
+ )
}
diff --git a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ApiLintVersionsTest.kt b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ApiLintVersionsTest.kt
index e2cc0bd..54f4f01 100644
--- a/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ApiLintVersionsTest.kt
+++ b/annotation/annotation-experimental-lint/src/test/kotlin/androidx/annotation/experimental/lint/ApiLintVersionsTest.kt
@@ -36,6 +36,6 @@
// We hardcode version registry.api to the version that is used to run tests.
assertEquals("registry.api matches version used to run tests", CURRENT_API, registry.api)
// Intentionally fails in IDE, because we use different API version in Studio and CLI.
- assertEquals("registry.minApi is set to minimum level of 8", 8, registry.minApi)
+ assertEquals("registry.minApi is set to minimum level of 10", 10, registry.minApi)
}
}
diff --git a/appcompat/appcompat-lint/src/main/kotlin/androidx/appcompat/AppCompatIssueRegistry.kt b/appcompat/appcompat-lint/src/main/kotlin/androidx/appcompat/AppCompatIssueRegistry.kt
index 056c0f17..75d8829 100644
--- a/appcompat/appcompat-lint/src/main/kotlin/androidx/appcompat/AppCompatIssueRegistry.kt
+++ b/appcompat/appcompat-lint/src/main/kotlin/androidx/appcompat/AppCompatIssueRegistry.kt
@@ -27,6 +27,7 @@
import androidx.appcompat.widget.TextViewCompoundDrawablesApiDetector
import androidx.appcompat.widget.TextViewCompoundDrawablesXmlDetector
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
@Suppress("UnstableApiUsage")
class AppCompatIssueRegistry : IssueRegistry() {
@@ -44,4 +45,8 @@
TextViewCompoundDrawablesXmlDetector.NOT_USING_COMPAT_TEXT_VIEW_DRAWABLE_ATTRS,
OnClickXmlDetector.USING_ON_CLICK_IN_XML
)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=460343"
+ )
}
diff --git a/fragment/fragment-lint/src/main/java/androidx/fragment/lint/FragmentIssueRegistry.kt b/fragment/fragment-lint/src/main/java/androidx/fragment/lint/FragmentIssueRegistry.kt
index bba9973..ec305a3 100644
--- a/fragment/fragment-lint/src/main/java/androidx/fragment/lint/FragmentIssueRegistry.kt
+++ b/fragment/fragment-lint/src/main/java/androidx/fragment/lint/FragmentIssueRegistry.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("UnstableApiUsage")
+
package androidx.fragment.lint
import com.android.tools.lint.client.api.IssueRegistry
diff --git a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/ApiLintVersionsTest.kt b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/ApiLintVersionsTest.kt
index c5e38ba..5ffc19a 100644
--- a/fragment/fragment-lint/src/test/java/androidx/fragment/lint/ApiLintVersionsTest.kt
+++ b/fragment/fragment-lint/src/test/java/androidx/fragment/lint/ApiLintVersionsTest.kt
@@ -35,6 +35,6 @@
assertThat(registry.api).isEqualTo(CURRENT_API)
// Intentionally fails in IDE, because we use different API version in
// studio and command line
- assertThat(registry.minApi).isEqualTo(8)
+ assertThat(registry.minApi).isEqualTo(10)
}
}
diff --git a/fragment/fragment-testing-lint/build.gradle b/fragment/fragment-testing-lint/build.gradle
index e4170a6..1e70d24 100644
--- a/fragment/fragment-testing-lint/build.gradle
+++ b/fragment/fragment-testing-lint/build.gradle
@@ -23,7 +23,7 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.kotlinStdlib)
testImplementation(libs.kotlinStdlib)
diff --git a/fragment/fragment-testing-lint/src/main/java/androidx/fragment/testing/lint/FragmentTestingIssueRegistry.kt b/fragment/fragment-testing-lint/src/main/java/androidx/fragment/testing/lint/FragmentTestingIssueRegistry.kt
index 8303419..60fb3c1 100644
--- a/fragment/fragment-testing-lint/src/main/java/androidx/fragment/testing/lint/FragmentTestingIssueRegistry.kt
+++ b/fragment/fragment-testing-lint/src/main/java/androidx/fragment/testing/lint/FragmentTestingIssueRegistry.kt
@@ -14,13 +14,20 @@
* limitations under the License.
*/
+@file:Suppress("UnstableApiUsage")
+
package androidx.fragment.testing.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
class FragmentTestingIssueRegistry : IssueRegistry() {
override val api = 10
override val minApi = CURRENT_API
override val issues get() = listOf(GradleConfigurationDetector.ISSUE)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=460964"
+ )
}
diff --git a/fragment/fragment-testing-lint/src/test/java/androidx/fragment/testing/lint/ApiLintVersionsTest.kt b/fragment/fragment-testing-lint/src/test/java/androidx/fragment/testing/lint/ApiLintVersionsTest.kt
index 3b659c7..82745c6 100644
--- a/fragment/fragment-testing-lint/src/test/java/androidx/fragment/testing/lint/ApiLintVersionsTest.kt
+++ b/fragment/fragment-testing-lint/src/test/java/androidx/fragment/testing/lint/ApiLintVersionsTest.kt
@@ -36,6 +36,6 @@
assertThat(registry.api).isEqualTo(CURRENT_API)
// Intentionally fails in IDE, because we use different API version in
// studio and command line
- assertThat(registry.minApi).isEqualTo(8)
+ assertThat(registry.minApi).isEqualTo(10)
}
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 5887db6..2bb1c64 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -37,6 +37,7 @@
wire = "3.6.0"
[libraries]
+androidBuilderModel = { module = "com.android.tools.build:builder-model", version.ref = "androidGradlePlugin" }
androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
androidLint = { module = "com.android.tools.lint:lint", version.ref = "androidLint" }
androidLintMin = { module = "com.android.tools.lint:lint", version.ref = "androidLintMin" }
diff --git a/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle b/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
index 12b0831..32a876f 100644
--- a/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
+++ b/lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
@@ -24,7 +24,7 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.androidLintMin)
compileOnly(libs.kotlinStdlib)
diff --git a/lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/LiveDataCoreIssueRegistry.kt b/lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/LiveDataCoreIssueRegistry.kt
index 23ad130..efa7fda 100644
--- a/lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/LiveDataCoreIssueRegistry.kt
+++ b/lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/LiveDataCoreIssueRegistry.kt
@@ -14,13 +14,20 @@
* limitations under the License.
*/
+@file:Suppress("UnstableApiUsage")
+
package androidx.lifecycle.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
class LiveDataCoreIssueRegistry : IssueRegistry() {
override val minApi = CURRENT_API
override val api = 10
override val issues get() = listOf(NonNullableMutableLiveDataDetector.ISSUE)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=413132"
+ )
}
diff --git a/lifecycle/lifecycle-runtime-ktx-lint/src/main/java/androidx/lifecycle/lint/LifecycleRuntimeIssueRegistry.kt b/lifecycle/lifecycle-runtime-ktx-lint/src/main/java/androidx/lifecycle/lint/LifecycleRuntimeIssueRegistry.kt
index d107f47..d153816 100644
--- a/lifecycle/lifecycle-runtime-ktx-lint/src/main/java/androidx/lifecycle/lint/LifecycleRuntimeIssueRegistry.kt
+++ b/lifecycle/lifecycle-runtime-ktx-lint/src/main/java/androidx/lifecycle/lint/LifecycleRuntimeIssueRegistry.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("UnstableApiUsage")
+
package androidx.lifecycle.lint
import com.android.tools.lint.client.api.IssueRegistry
diff --git a/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt b/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
index 07406d5..a917fde5 100644
--- a/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
+++ b/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
@@ -35,6 +35,6 @@
Assert.assertEquals(CURRENT_API, registry.api)
// Intentionally fails in IDE, because we use different API version in
// studio and command line
- Assert.assertEquals(3, registry.minApi)
+ Assert.assertEquals(8, registry.minApi)
}
}
diff --git a/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt b/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt
index 6f93b40..19ced00 100644
--- a/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt
+++ b/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt
@@ -19,6 +19,7 @@
package androidx.build.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
import com.android.tools.lint.detector.api.Issue
@@ -28,6 +29,10 @@
override val issues get(): List<Issue> {
return Issues
}
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=192731"
+ )
companion object {
val Issues get(): List<Issue> {
diff --git a/recyclerview/recyclerview-lint/build.gradle b/recyclerview/recyclerview-lint/build.gradle
index a5d4b72..4835b0b 100644
--- a/recyclerview/recyclerview-lint/build.gradle
+++ b/recyclerview/recyclerview-lint/build.gradle
@@ -23,7 +23,7 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.kotlinStdlib)
testImplementation(libs.kotlinStdlib)
diff --git a/recyclerview/recyclerview-lint/src/main/java/androidx/recyclerview/lint/RecyclerViewIssueRegistry.kt b/recyclerview/recyclerview-lint/src/main/java/androidx/recyclerview/lint/RecyclerViewIssueRegistry.kt
index 5290049..93d382c 100644
--- a/recyclerview/recyclerview-lint/src/main/java/androidx/recyclerview/lint/RecyclerViewIssueRegistry.kt
+++ b/recyclerview/recyclerview-lint/src/main/java/androidx/recyclerview/lint/RecyclerViewIssueRegistry.kt
@@ -19,6 +19,7 @@
package androidx.recyclerview.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
import com.android.tools.lint.detector.api.Issue
@@ -29,4 +30,8 @@
get() = listOf(
InvalidSetHasFixedSizeDetector.ISSUE
)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=460887"
+ )
}
diff --git a/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/ApiLintVersionsTest.kt b/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/ApiLintVersionsTest.kt
index 3478bd2..cae6708 100644
--- a/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/ApiLintVersionsTest.kt
+++ b/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/ApiLintVersionsTest.kt
@@ -36,6 +36,6 @@
// We hardcode version registry.api to the version that is used to run tests.
assertEquals("registry.api matches version used to run tests", CURRENT_API, registry.api)
// Intentionally fails in IDE, because we use different API version in Studio and CLI.
- assertEquals("registry.minApi is set to minimum level of 8", 8, registry.minApi)
+ assertEquals("registry.minApi is set to minimum level of 10", 10, registry.minApi)
}
}
diff --git a/startup/startup-runtime-lint/build.gradle b/startup/startup-runtime-lint/build.gradle
index a5e584b..85ddbf3 100644
--- a/startup/startup-runtime-lint/build.gradle
+++ b/startup/startup-runtime-lint/build.gradle
@@ -23,7 +23,7 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.kotlinStdlib)
testImplementation(libs.kotlinStdlib)
diff --git a/startup/startup-runtime-lint/src/main/java/androidx/startup/lint/StartupRuntimeIssueRegistry.kt b/startup/startup-runtime-lint/src/main/java/androidx/startup/lint/StartupRuntimeIssueRegistry.kt
index 9cbccb3..8bcf291 100644
--- a/startup/startup-runtime-lint/src/main/java/androidx/startup/lint/StartupRuntimeIssueRegistry.kt
+++ b/startup/startup-runtime-lint/src/main/java/androidx/startup/lint/StartupRuntimeIssueRegistry.kt
@@ -19,6 +19,7 @@
package androidx.startup.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
import com.android.tools.lint.detector.api.Issue
@@ -33,4 +34,8 @@
InitializerConstructorDetector.ISSUE,
EnsureInitializerMetadataDetector.ISSUE
)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=823348"
+ )
}
diff --git a/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/ApiLintVersionsTest.kt b/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/ApiLintVersionsTest.kt
index 561f972..596f449 100644
--- a/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/ApiLintVersionsTest.kt
+++ b/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/ApiLintVersionsTest.kt
@@ -36,6 +36,6 @@
// We hardcode version registry.api to the version that is used to run tests.
assertEquals("registry.api matches version used to run tests", CURRENT_API, registry.api)
// Intentionally fails in IDE, because we use different API version in Studio and CLI.
- assertEquals("registry.minApi is set to minimum level of 8", 8, registry.minApi)
+ assertEquals("registry.minApi is set to minimum level of 10", 10, registry.minApi)
}
}
diff --git a/work/workmanager-lint/build.gradle b/work/workmanager-lint/build.gradle
index a8faacc..b06eb51 100644
--- a/work/workmanager-lint/build.gradle
+++ b/work/workmanager-lint/build.gradle
@@ -23,7 +23,7 @@
}
dependencies {
- compileOnly(libs.androidLintMinApi)
+ compileOnly(libs.androidLintApi)
compileOnly(libs.kotlinStdlib)
testImplementation(libs.kotlinStdlib)
diff --git a/work/workmanager-lint/src/main/java/androidx/work/lint/WorkManagerIssueRegistry.kt b/work/workmanager-lint/src/main/java/androidx/work/lint/WorkManagerIssueRegistry.kt
index b2f4b69..4d04fb6 100644
--- a/work/workmanager-lint/src/main/java/androidx/work/lint/WorkManagerIssueRegistry.kt
+++ b/work/workmanager-lint/src/main/java/androidx/work/lint/WorkManagerIssueRegistry.kt
@@ -19,6 +19,7 @@
package androidx.work.lint
import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
import com.android.tools.lint.detector.api.CURRENT_API
import com.android.tools.lint.detector.api.Issue
@@ -36,4 +37,8 @@
SpecifyJobSchedulerIdRangeIssueDetector.ISSUE,
WorkerHasPublicModifierDetector.ISSUE
)
+ override val vendor = Vendor(
+ vendorName = "Android Open Source Project",
+ feedbackUrl = "https://issuetracker.google.com/issues/new?component=409906"
+ )
}
diff --git a/work/workmanager-lint/src/test/java/androidx/work/lint/ApiLintVersionsTest.kt b/work/workmanager-lint/src/test/java/androidx/work/lint/ApiLintVersionsTest.kt
index 3dc48cd..372dbc7 100644
--- a/work/workmanager-lint/src/test/java/androidx/work/lint/ApiLintVersionsTest.kt
+++ b/work/workmanager-lint/src/test/java/androidx/work/lint/ApiLintVersionsTest.kt
@@ -36,6 +36,6 @@
// We hardcode version registry.api to the version that is used to run tests.
assertEquals("registry.api matches version used to run tests", CURRENT_API, registry.api)
// Intentionally fails in IDE, because we use different API version in Studio and CLI.
- assertEquals("registry.minApi is set to minimum level of 8", 8, registry.minApi)
+ assertEquals("registry.minApi is set to minimum level of 10", 10, registry.minApi)
}
}