Skip to content

Commit

Permalink
#1160 Updates build file to create OSX aarch64 image.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Sheirer committed Mar 12, 2022
1 parent 1fb0456 commit afdcfff
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,16 @@ idea {
*/
def jdk_base = '/home/denny/java_jdks/'

def jdk_linux_arm64 = jdk_base + 'linux-arm64/jdk-17.0.2-full'
def jdk_linux_aarch64 = jdk_base + 'linux-arm64/jdk-17.0.2-full'
def jdk_linux_x86_64 = jdk_base + 'linux-x64/jdk-17.0.2-full'
def jdk_osx_x86_64 = jdk_base + 'osx-x64/jdk-17.0.2-full.jdk'
def jdk_osx_aarch64 = jdk_base + 'osx-arm64/jdk-17.0.2-full.jdk'
def jdk_windows_x86_64 = jdk_base + 'windows-x64/jdk-17.0.2-full'

def hasTargetJdk = file(jdk_linux_x86_64).exists() ||
file(jdk_linux_arm64).exists() ||
file(jdk_linux_aarch64).exists() ||
file(jdk_osx_x86_64).exists() ||
file(jdk_osx_aarch64).exists() ||
file(jdk_windows_x86_64).exists()

/**
Expand All @@ -149,13 +151,13 @@ def hasTargetJdk = file(jdk_linux_x86_64).exists() ||
* however I normally have them installed locally and use those versions.
*/
runtime {
if(file(jdk_linux_arm64).exists())
if(file(jdk_linux_aarch64).exists())
{
targetPlatform('linux-arm64-v' + version, jdk_linux_arm64)
targetPlatform('linux-aarch64-v' + version, jdk_linux_aarch64)
}
else
{
println("Skipping OS Image - Linux ARM 64-bit JDK was not found at " + jdk_linux_arm64)
println("Skipping OS Image - Linux aarch64 JDK was not found at " + jdk_linux_aarch64)
}

if(file(jdk_linux_x86_64).exists())
Expand All @@ -176,6 +178,15 @@ runtime {
println("Skipping OS Image - OSX x86 64-bit JDK was not found at " + jdk_osx_x86_64);
}

if(file(jdk_osx_aarch64).exists())
{
targetPlatform('osx-aarch64-v' + version, jdk_osx_aarch64)
}
else
{
println("Skipping OS Image - OSX aarch64 JDK was not found at " + jdk_osx_aarch64);
}

if(file(jdk_windows_x86_64).exists())
{
targetPlatform('windows-x86_64-v' + version, jdk_windows_x86_64)
Expand All @@ -188,7 +199,6 @@ runtime {
//jdk.crypto.ec is needed for HTTPS connections (broadcastify calls & map tile server)
modules = ['jdk.crypto.ec']
additive = true

options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
imageZip = hasTargetJdk ? file("$buildDir/image/sdr-trunk.zip") : file("$buildDir/image/sdr-trunk-" + version + ".zip")
}

0 comments on commit afdcfff

Please sign in to comment.