From 1b7a2432b369a85e41bb3b0843fbc625d0210a7f Mon Sep 17 00:00:00 2001 From: Anton Lakotka Date: Tue, 21 Mar 2023 13:58:43 +0100 Subject: [PATCH] [Gradle] Init configurationToResolve during class initialisation This should prevent from accessing transient and potentially nullable `kotlinSourceSet` for up-to-date checks. ^KT-57460 Verification Pending --- .../gradle/plugin/mpp/MetadataDependencyTransformationTask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt index 6495cb3aa0172..95be88cdfe7ca 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/MetadataDependencyTransformationTask.kt @@ -52,7 +52,7 @@ open class MetadataDependencyTransformationTask @get:PathSensitive(PathSensitivity.RELATIVE) @get:IgnoreEmptyDirectories @get:NormalizeLineEndings - internal val configurationToResolve: FileCollection get() = kotlinSourceSet.internal.resolvableMetadataConfiguration + internal val configurationToResolve: FileCollection = project.filesProvider { kotlinSourceSet.internal.resolvableMetadataConfiguration } @Suppress("unused") // Gradle input @get:InputFiles