Skip to content

Commit

Permalink
chore: use custom launch4j binaries (#1259)
Browse files Browse the repository at this point in the history
* chore: use custom launch4j binaries

* fix: launch4j workdir macosx classifier

* Update build.gradle
  • Loading branch information
miurahr authored Feb 22, 2025
1 parent 47ef897 commit f3bfdb2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
alias(libs.plugins.versions)
alias(libs.plugins.launch4j)
alias(libs.plugins.ssh)
id("com.google.osdetector") version "1.7.3"
}

apply from: 'gradle/utils.gradle'
Expand All @@ -33,6 +34,9 @@ def gradleOnJava17OrLater = JavaVersion.current().isCompatibleWith(JavaVersion.V
tasks.named('updateDaemonJvm') {
jvmVersion = JavaVersion.VERSION_17
}
def os = osdetector.os
def osArch = osdetector.classifier


def execContainerTasks = !project.hasProperty('forceSkipDocumentBuild') && exePresent('docker') || exePresent('nerdctl')
def execWinDistTask = (exePresent('iscc') || execContainerTasks)
Expand Down Expand Up @@ -404,6 +408,19 @@ dependencies {
testIntegrationImplementation(testFixtures(project.rootProject))
testIntegrationRuntimeOnly(libs.slf4j.jdk14)

// workdir classifiers are hard-coded in gralde-launch4j plugin
if ("windows".equals(os)) {
launch4jBin 'org.omegat:launch4j:3.55:workdir-win32'
} else if ("osx".equals(os)) {
launch4jBin 'org.omegat:launch4j:3.55:workdir-mac'
} else if ("linux-x86_64".equals(osArch)) {
launch4jBin 'org.omegat:launch4j:3.55:workdir-linux64'
} else if ("linux-aarch_64".equals(osArch)) {
// gradle-launch4j plugin use the classifier
// for architectures other than x86_64 on linux
launch4jBin 'org.omegat:launch4j:3.55:workdir-linux'
}

jacocoAggregation project(':aligner')
jacocoAggregation project(":machinetranslators:apertium")
jacocoAggregation project(":machinetranslators:belazar")
Expand Down

0 comments on commit f3bfdb2

Please sign in to comment.