Skip to content

Commit

Permalink
Add apple silicon target for smithy cli
Browse files Browse the repository at this point in the history
  • Loading branch information
JordonPhillips committed Dec 9, 2021
1 parent 982654e commit 78a3ac9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion smithy-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ ext {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
ext.set("imageOs", "win64")
} else if (Os.isFamily(Os.FAMILY_MAC)) {
ext.set("imageOs", "osx-x86_64")
if (Os.isArch("aarch64")) {
ext.set("imageOs", "osx-aarch_64")
} else if (Os.isArch("x86_64")) {
ext.set("imageOs", "osx-x86_64")
} else {
println("No JDK for ${System.getProperty("os.arch")}")
ext.set("imageOs", "")
}
} else if (Os.isFamily(Os.FAMILY_UNIX)) {
if (Os.isArch("aarch")) {
ext.set("imageOs", "linux-aarch_64")
Expand Down Expand Up @@ -84,6 +91,10 @@ runtime {
jdkHome = jdkDownload("${correttoRoot}-x64-macos-jdk.tar.gz")
}

targetPlatform("osx-aarch_64") {
jdkHome = jdkDownload("${correttoRoot}-aarch64-macos-jdk.tar.gz")
}

targetPlatform("win64") {
jdkHome = jdkDownload("${correttoRoot}-x64-windows-jdk.zip")
}
Expand Down

0 comments on commit 78a3ac9

Please sign in to comment.