From 44e92a61348c00470653da05fee32b00d44f42ee Mon Sep 17 00:00:00 2001 From: Alexander Likhachev Date: Mon, 21 Feb 2022 18:02:31 +0300 Subject: [PATCH] [Build] Fix configuration cache problem with `embeddable` task #KT-44611 In Progress --- buildSrc/src/main/kotlin/embeddable.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/embeddable.kt b/buildSrc/src/main/kotlin/embeddable.kt index 3ff7df3dc78..941e7c5ff3f 100644 --- a/buildSrc/src/main/kotlin/embeddable.kt +++ b/buildSrc/src/main/kotlin/embeddable.kt @@ -7,6 +7,7 @@ import org.gradle.api.artifacts.component.ProjectComponentSelector import org.gradle.api.attributes.LibraryElements import org.gradle.api.attributes.Usage import org.gradle.api.file.DuplicatesStrategy +import org.gradle.api.file.FileCollection import org.gradle.api.tasks.TaskProvider import org.gradle.jvm.tasks.Jar import org.gradle.kotlin.dsl.named @@ -165,8 +166,8 @@ fun Project.rewriteDepsToShadedJar( // When Gradle traverses the inputs, reject the shaded compiler JAR, // which leads to the content of that JAR being excluded as well: - val compilerDummyJarFile = project.provider { project.configurations.getByName("compilerDummyJar").singleFile } - exclude { it.file == compilerDummyJarFile.get() } + val compilerDummyJarConfiguration: FileCollection = project.configurations.getByName("compilerDummyJar") + exclude { it.file == compilerDummyJarConfiguration.singleFile } archiveClassifier.set("original") body()