[Gradle] Use objectFactory.fileCollection instead of lazy

^KT-43293
This commit is contained in:
Anton Lakotka
2022-07-14 13:59:56 +02:00
committed by Space
parent 58d74b57e7
commit 8cc9406b1f
@@ -166,14 +166,14 @@ abstract class AbstractKotlinNativeCompile<
}
@get:Classpath
override val libraries: ConfigurableFileCollection by lazy {
override val libraries: ConfigurableFileCollection = objectFactory.fileCollection().from({
// Avoid resolving these dependencies during task graph construction when we can't build the target:
if (konanTarget.enabledOnCurrentHost)
objectFactory.fileCollection().from(
compilation.compileDependencyFiles.filterOutPublishableInteropLibs(project)
)
else objectFactory.fileCollection()
}
})
@get:Classpath
protected val friendModule: FileCollection = project.files({ compilation.friendPaths })