[Gradle] setupCInteropPropagatedDependencies: retain task dependencies

^KT-47523
This commit is contained in:
sebastian.sellmair
2021-08-20 11:17:04 +02:00
committed by Space
parent 882d72b1f7
commit 487524f6b0
@@ -79,9 +79,10 @@ private fun Project.getPropagatedCInteropDependenciesOrEmpty(compilation: Kotlin
getAllCInteropOutputFiles(platformCompilation)
}
private fun Project.getAllCInteropOutputFiles(compilation: KotlinNativeCompilation): List<File> {
return compilation.cinterops
.map { interop -> interop.interopProcessingTaskName }
private fun Project.getAllCInteropOutputFiles(compilation: KotlinNativeCompilation): FileCollection {
val cinteropTasks = compilation.cinterops.map { interop -> interop.interopProcessingTaskName }
.mapNotNull { taskName -> tasks.findByName(taskName) as? CInteropProcess }
.map { it.outputFile }
return project.filesProvider { cinteropTasks.map { it.outputFile } }
.builtBy(*cinteropTasks.toTypedArray())
}