(minor) replace the predicate for intermediate source set
Use a condition that is safe in projects with just one target and intermediate source sets.
This commit is contained in:
+2
-1
@@ -125,7 +125,8 @@ abstract class AbstractKotlinNativeTargetPreset<T : KotlinNativeTarget>(
|
|||||||
fun KotlinSourceSet.isIntermediateNativeSourceSet(): Boolean {
|
fun KotlinSourceSet.isIntermediateNativeSourceSet(): Boolean {
|
||||||
val compilations = compilationsBySourceSets[this] ?: return false
|
val compilations = compilationsBySourceSets[this] ?: return false
|
||||||
|
|
||||||
if (compilations.size <= 1) return false // intermediate source-sets participate at least in two compilations
|
if (compilations.all { it.defaultSourceSet == this })
|
||||||
|
return false
|
||||||
|
|
||||||
return compilations.all { it.target.platformType == KotlinPlatformType.native }
|
return compilations.all { it.target.platformType == KotlinPlatformType.native }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user