Unverified Commit d0b681d2 authored by Oleksandr Karpovich's avatar Oleksandr Karpovich Committed by GitHub

Changes required for using MacOS ARM agents instead of x86 (#998)

parent bbfaf622
......@@ -455,6 +455,7 @@ fun SkikoProjectContext.createSkikoJvmJarTask(os: OS, arch: Arch, commonJar: Tas
val createChecksums2 = createChecksumsTask(os, altArch, nativeLib2)
nativeFiles.add(nativeLib2)
nativeFiles.add(createChecksums2.map { it.outputs.files.singleFile })
allJvmRuntimeJars[os to altArch] = skikoJvmRuntimeJarTask(os, altArch, commonJar, nativeFiles)
}
val skikoJvmRuntimeJar = skikoJvmRuntimeJarTask(os, arch, commonJar, nativeFiles)
allJvmRuntimeJars[os to arch] = skikoJvmRuntimeJar
......
......@@ -31,6 +31,21 @@ fun String.withSuffix(isUikitSim: Boolean = false) =
fun KotlinTarget.isUikitSimulator() =
name.contains("Simulator", ignoreCase = true) || name == "tvosX64" // x64 tvOS is implicitly a simulator
fun Project.findXcodeSdkRoot(): String {
val defaultPath = "/Applications/Xcode.app/Contents/Developer/Platforms"
if (File(defaultPath).exists()) {
return defaultPath.also {
println("findXcodeSdkRoot = $it")
}
}
return (project.property("skiko.ci.xcodehome") as? String)?.let {
val sdkPath = it + "/Platforms"
println("findXcodeSdkRoot = $sdkPath")
sdkPath
} ?: error("gradle property `skiko.ci.xcodehome` is not set")
}
fun SkikoProjectContext.compileNativeBridgesTask(
os: OS, arch: Arch, isUikitSim: Boolean
): TaskProvider<CompileSkikoCppTask> = with (this.project) {
......@@ -52,7 +67,7 @@ fun SkikoProjectContext.compileNativeBridgesTask(
when (os) {
OS.IOS -> {
val sdkRoot = "/Applications/Xcode.app/Contents/Developer/Platforms"
val sdkRoot = findXcodeSdkRoot()
val iphoneOsSdk = "$sdkRoot/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
val iphoneSimSdk = "$sdkRoot/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"
val iosArchFlags = when (arch) {
......@@ -76,7 +91,7 @@ fun SkikoProjectContext.compileNativeBridgesTask(
))
}
OS.TVOS -> {
val sdkRoot = "/Applications/Xcode.app/Contents/Developer/Platforms"
val sdkRoot = findXcodeSdkRoot()
val tvOsSdk = "$sdkRoot/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk"
val tvSimSdk = "$sdkRoot/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk"
val tvosArchFlags = when (arch) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment