Merge pull request #1255 from toad-dev/patch/illuaminate-support-arm-macs

Deliver x86_64 Illuaminate binaries to all Macs
This commit is contained in:
Jonathan Coates 2022-12-18 00:00:22 +00:00 committed by GitHub
commit 9d394f44d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -66,9 +66,11 @@ private fun illuaminateArtifact(project: Project, version: String): Dependency {
val osArch = System.getProperty("os.arch").toLowerCase()
val arch = when {
// On macOS the x86_64 binary will work for both ARM and Intel Macs through Rosetta.
os == "macos" -> "x86_64"
osArch == "arm" || osArch.startsWith("aarch") -> error("Unsupported architecture '$osArch' for illuaminate")
osArch.contains("64") -> "x86_64"
else -> error("Unsupported architecture $osArch for illuaminate")
else -> error("Unsupported architecture '$osArch' for illuaminate")
}
return project.dependencies.create(