(minor) Fix accessing a shared-native compilation's konanTarget

As future some Kotlin/Native compilations in the future may have
different platforms within one target, it's more preferable to
access the konanTarget from the compilation, not its target.
This commit is contained in:
Sergey Igushkin
2020-01-24 23:18:45 +03:00
parent 1f42951152
commit 823d3cc412
@@ -379,7 +379,7 @@ class KotlinMetadataTargetConfigurator(kotlinPluginVersion: String) :
PropertiesProvider(project.rootProject).enableCommonKlibs == true &&
singleOrNull() == KotlinPlatformType.native &&
compilations.map { it.target }.distinct().size > 1 &&
compilations.all { (it.target as? KotlinNativeTarget)?.konanTarget?.enabledOnCurrentHost == true }
compilations.all { (it as AbstractKotlinNativeCompilation).konanTarget.enabledOnCurrentHost }
)
}
}