From eca9503fed02ff3de1c7b3a2beeace3a67ad1c3d Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 13 Feb 2026 20:51:48 +0800 Subject: [PATCH] Eliminate findByName for ShadowKmpPlugin --- .../github/jengelman/gradle/plugins/shadow/ShadowKmpPlugin.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowKmpPlugin.kt b/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowKmpPlugin.kt index 441ad5b5d..9c3bb9591 100644 --- a/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowKmpPlugin.kt +++ b/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowKmpPlugin.kt @@ -17,8 +17,7 @@ public abstract class ShadowKmpPlugin : Plugin { extensions.getByType(KotlinMultiplatformExtension::class.java).targets.configureEach { target -> if (target !is KotlinJvmTarget) return@configureEach - @Suppress("EagerGradleConfiguration") - if (tasks.findByName(SHADOW_JAR_TASK_NAME) != null) { + if (tasks.names.contains(SHADOW_JAR_TASK_NAME)) { // Declaring multiple Kotlin Targets of the same type is not supported. See // https://kotl.in/declaring-multiple-targets for more details. logger.info(