(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:
+1
-1
@@ -379,7 +379,7 @@ class KotlinMetadataTargetConfigurator(kotlinPluginVersion: String) :
|
|||||||
PropertiesProvider(project.rootProject).enableCommonKlibs == true &&
|
PropertiesProvider(project.rootProject).enableCommonKlibs == true &&
|
||||||
singleOrNull() == KotlinPlatformType.native &&
|
singleOrNull() == KotlinPlatformType.native &&
|
||||||
compilations.map { it.target }.distinct().size > 1 &&
|
compilations.map { it.target }.distinct().size > 1 &&
|
||||||
compilations.all { (it.target as? KotlinNativeTarget)?.konanTarget?.enabledOnCurrentHost == true }
|
compilations.all { (it as AbstractKotlinNativeCompilation).konanTarget.enabledOnCurrentHost }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user