From 890977c3914da0c11c72812f626974549d08a2f1 Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 31 Oct 2025 10:13:23 +0800 Subject: [PATCH 1/3] Fix lints in AndroidPluginIntegration --- gradle-plugin/lint-baseline.xml | 11 ----------- .../devtools/ksp/gradle/AndroidPluginIntegration.kt | 10 +++++----- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/gradle-plugin/lint-baseline.xml b/gradle-plugin/lint-baseline.xml index cc63ad080d..117103a910 100644 --- a/gradle-plugin/lint-baseline.xml +++ b/gradle-plugin/lint-baseline.xml @@ -1,17 +1,6 @@ - - - - - // this is workaround for KAPT generator that prevents circular dependency - val filteredSources = Callable { - val destinationProperty = (kaptProvider?.get() as? KaptTask)?.destinationDir - val dir = destinationProperty?.get()?.asFile + // Workaround for KAPT generator that prevents circular dependency, we can't call kaptProvider.map directly. + val filteredSources = project.provider { + @Suppress("EagerGradleConfiguration") // kaptProvider could be gotten in provider. + val kapt = kaptProvider?.get() + val dir = (kapt as? KaptTask)?.destinationDir?.get()?.asFile sources?.filter { source -> dir?.isParentOf(source.dir) != true && source.dir !in kspExtension.excludedSources From 383cb6945d5c903406d8c233dd43e43d059c1fd3 Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 31 Oct 2025 10:38:05 +0800 Subject: [PATCH 2/3] Fix lints in KspAATask --- gradle-plugin/lint-baseline.xml | 22 ------------------- .../google/devtools/ksp/gradle/KspAATask.kt | 20 ++++++++--------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/gradle-plugin/lint-baseline.xml b/gradle-plugin/lint-baseline.xml index 117103a910..fb7e0a047b 100644 --- a/gradle-plugin/lint-baseline.xml +++ b/gradle-plugin/lint-baseline.xml @@ -1,28 +1,6 @@ - - - - - - - - = project.providers.gradleProperty( "kotlin.native.enableKlibsCrossCompilation" From 1e2e9fc97e94972970ecea7f9913f232957bb02c Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 31 Oct 2025 11:25:03 +0800 Subject: [PATCH 3/3] Fix lints in KspConfigurations --- gradle-plugin/lint-baseline.xml | 22 ------------- .../devtools/ksp/gradle/KspConfigurations.kt | 32 ++++++++++--------- 2 files changed, 17 insertions(+), 37 deletions(-) diff --git a/gradle-plugin/lint-baseline.xml b/gradle-plugin/lint-baseline.xml index fb7e0a047b..5f9a3ca0a0 100644 --- a/gradle-plugin/lint-baseline.xml +++ b/gradle-plugin/lint-baseline.xml @@ -1,17 +1,6 @@ - - - - - - - - { kotlin.targets.configureEach { decorateKotlinTarget(it, isKotlinMultiplatform = true) } - var reported = false - configurationForAll.dependencies.whenObjectAdded { - if (!reported) { - reported = true - val msg = "The 'ksp' configuration is deprecated in Kotlin Multiplatform projects. " + - "Please use target-specific configurations like 'kspJvm' instead." - - if (allowAllTargetConfiguration) { - project.logger.warn(msg) - } else { - throw InvalidUserCodeException(msg) + configurationForAll.configure { configuration -> + var reported = false + configuration.dependencies.configureEach { + if (!reported) { + reported = true + val msg = "The 'ksp' configuration is deprecated in Kotlin Multiplatform projects. " + + "Please use target-specific configurations like 'kspJvm' instead." + + if (allowAllTargetConfiguration) { + project.logger.warn(msg) + } else { + throw InvalidUserCodeException(msg) + } } } }