[Gradle] setupCInteropPropagatedDependencies: retain task dependencies
^KT-47523
This commit is contained in:
committed by
Space
parent
882d72b1f7
commit
487524f6b0
+5
-4
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user