Support Xcode 9.3.1, allow version check override (#1588)

This commit is contained in:
Nikolay Igotti
2018-05-14 07:15:10 -07:00
committed by GitHub
parent f512b3b60a
commit 0c0446b56d
4 changed files with 21 additions and 15 deletions
@@ -56,8 +56,10 @@ class AppleConfigurablesImpl(
properties.getProperty("useFixedXcodeVersion")?.let { requiredXcodeVersion ->
val currentXcodeVersion = xcode.version
if (currentXcodeVersion != requiredXcodeVersion) {
error("expected Xcode version $requiredXcodeVersion, got $currentXcodeVersion")
if (properties.getProperty("ignoreXcodeVersionCheck") != "true" &&
currentXcodeVersion != requiredXcodeVersion) {
error("expected Xcode version $requiredXcodeVersion, got $currentXcodeVersion, consider updating " +
"Xcode or use \"ignoreXcodeVersionCheck\" variable in konan.properties")
}
}
@@ -67,7 +67,7 @@ fun Properties.keepOnlyDefaultProfiles() {
// Force build to use only 'default' profile:
this.setProperty(DEPENDENCY_PROFILES_KEY, "default")
// Force build to use fixed Xcode version:
this.setProperty("useFixedXcodeVersion", "9.3")
this.setProperty("useFixedXcodeVersion", "9.3.1")
// TODO: it actually affects only resolution made in :dependencies,
// that's why we assume that 'default' profile comes first (and check this above).
}