From 7fbdeb422fd791d4b36a92efb9a0ee72bfcc3d77 Mon Sep 17 00:00:00 2001 From: Daniel Fahey <dpfahey@gmail.com> Date: Wed, 23 Aug 2023 17:25:49 +0100 Subject: [PATCH] Gradle build task to create ARM64 Linux JAR --- README.md | 6 +++++- mailbox-cli/build.gradle | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17b3d085..9dc293ee 100644 --- a/README.md +++ b/README.md @@ -90,10 +90,14 @@ any hardware supporting Java (e.g. unix server, raspberry pi) could be added. ## Server CLI version -A fat JAR for running on a GNU/Linux server can be compiled with +A fat JAR for running on a x86_64 GNU/Linux server can be compiled with ./gradlew x86LinuxJar +And also AArch64 with + + ./gradlew ARM64LinuxJar + ## Donate [](https://liberapay.com/Briar/donate) [](https://flattr.com/t/592836/) Bitcoin and BCH: 1NZCKkUCtJV2U2Y9hDb9uq8S7ksFCFGR6K diff --git a/mailbox-cli/build.gradle b/mailbox-cli/build.gradle index 41668ab1..946963b7 100644 --- a/mailbox-cli/build.gradle +++ b/mailbox-cli/build.gradle @@ -109,7 +109,7 @@ void jarFactory(Jar jarTask, os, architecture, configuration) { destStream.close() srcJarFile.close() println 'Building ' + jarArchitecture + ' version has finished' - println 'JAR: mailbox-cli/build/libs/mailbox-cli-linux-x86_64.jar' + println 'JAR: mailbox-cli/build/libs/mailbox-cli-' + jarArchitecture + '.jar' } } @@ -119,6 +119,12 @@ task x86LinuxJar(type: Jar) { jarFactory(it, 'linux', 'x86_64', configurations.runtimeClasspath) } +task ARM64LinuxJar(type: Jar) { + group = "Build" + description = "Assembles a runnable fat jar for AArch64 Linux" + jarFactory(it, 'linux', 'aarch64', configurations.runtimeClasspath) +} + tasks.withType(Test) { systemProperty 'java.library.path', 'libs' } -- GitLab