(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:
Sergey Igushkin
2019-11-13 17:31:22 +03:00
parent bcabbcf3e1
commit 94f66c237b
@@ -125,7 +125,8 @@ abstract class AbstractKotlinNativeTargetPreset<T : KotlinNativeTarget>(
fun KotlinSourceSet.isIntermediateNativeSourceSet(): Boolean {
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 }
}