From a956306a521beb37e2e6eb07a3a360fc4956ca91 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sun, 12 Apr 2026 14:18:32 +0100 Subject: [PATCH 1/2] Apply androidx.lint:lint-gradle checks only to build-logic The Gradle-specific lint checks from androidx.lint:lint-gradle were being applied to all 27 library modules via quality-conventions, but they are designed for Gradle plugin code only. Move them to build-logic where they belong. Co-Authored-By: Claude Opus 4.6 (1M context) --- build-logic/build.gradle.kts | 3 ++- .../src/main/kotlin/okhttp.quality-conventions.gradle.kts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 0ec1cc3e7287..b556b6711f85 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -1,6 +1,7 @@ plugins { `kotlin-dsl` id("com.diffplug.spotless") version "8.4.0" + id("com.android.lint") } configure { @@ -36,6 +37,6 @@ dependencies { implementation(libs.gradlePlugin.ksp) implementation(libs.gradlePlugin.mrjar) implementation(libs.gradlePlugin.tapmoc) - implementation(libs.androidx.lint.gradle) implementation(libs.kotlin.gradle.plugin.api) + lintChecks(libs.androidx.lint.gradle) } diff --git a/build-logic/src/main/kotlin/okhttp.quality-conventions.gradle.kts b/build-logic/src/main/kotlin/okhttp.quality-conventions.gradle.kts index 0c0f0539a8f3..62e954ad86a0 100644 --- a/build-logic/src/main/kotlin/okhttp.quality-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/okhttp.quality-conventions.gradle.kts @@ -71,7 +71,6 @@ dependencies { androidSignature(library("signature-android-apilevel21")) { artifact { type = "signature" } } jvmSignature(library("codehaus-signature-java18")) { artifact { type = "signature" } } - "lintChecks"(library("androidx-lint-gradle")) } configure { From 5706dfafea3ef6ed27d4813bef94469b553820bf Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sun, 12 Apr 2026 14:27:21 +0100 Subject: [PATCH 2/2] Fix lint plugin version in build-logic The com.android.lint plugin needs an explicit version in the build-logic plugins block, matching the pattern used by spotless. Co-Authored-By: Claude Opus 4.6 (1M context) --- build-logic/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index b556b6711f85..433c85688a52 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `kotlin-dsl` id("com.diffplug.spotless") version "8.4.0" - id("com.android.lint") + id("com.android.lint") version "1.0.0-alpha05" } configure {