[Gradle] [MPP] CInteropPropagatedDependencies: Consider associate compilations
^KT-48856 Verification Pending
This commit is contained in:
committed by
Space
parent
e7d8804bdf
commit
c51d37d65d
+5
-3
@@ -67,9 +67,11 @@ private fun Project.getPropagatedCInteropDependenciesOrEmpty(sourceSet: DefaultK
|
|||||||
/* Participating in multiple compilations? -> can't propagate -> should be commonized */
|
/* Participating in multiple compilations? -> can't propagate -> should be commonized */
|
||||||
val compilation = compilations.singleOrNull() as? KotlinNativeCompilation ?: return@files emptySet<File>()
|
val compilation = compilations.singleOrNull() as? KotlinNativeCompilation ?: return@files emptySet<File>()
|
||||||
|
|
||||||
/* Source Set is directly included in compilation -> No need to add dependency again (will be handled already) */
|
(compilation.associateWith + compilation)
|
||||||
if (sourceSet in compilation.kotlinSourceSets) return@files emptySet<File>()
|
.filterIsInstance<KotlinNativeCompilation>()
|
||||||
getAllCInteropOutputFiles(compilation)
|
/* Source Set is directly included in compilation -> No need to add dependency again (will be handled already) */
|
||||||
|
.filter { relevantCompilation -> sourceSet !in relevantCompilation.kotlinSourceSets }
|
||||||
|
.map { relevantCompilation -> getAllCInteropOutputFiles(relevantCompilation) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user