-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle
More file actions
670 lines (577 loc) · 22.1 KB
/
build.gradle
File metadata and controls
670 lines (577 loc) · 22.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
import java.nio.file.Files
import java.nio.file.StandardCopyOption
buildscript {
repositories {
maven {
url = 'https://repository.mulesoft.org/nexus/content/repositories/public/'
}
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.adarshr:gradle-test-logger-plugin:4.0.0'
classpath 'gradle.plugin.net.ossindex:ossindex-gradle-plugin:0.4.11'
classpath 'org.kordamp.gradle:enforcer-gradle-plugin:0.14.0'
}
}
plugins {
id 'base'
id 'jacoco'
id 'com.github.ben-manes.versions' version '0.53.0'
id "org.sonarqube" version "6.3.1.5724"
id 'org.cyclonedx.bom' version '2.4.1'
}
cyclonedxBom {
includeConfigs = ["runtimeClasspath"]
}
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
ext {
// Defines the minimum BDeploy version when upgrading to "this" version. This is checked on servers which support this property prior to performing the update.
minSourceServerVersion = "4.2.0"
// CPU architecture of the running OS
currentArch = System.getProperty("os.arch")
// Defines the path to a WINDOWS JDK, to be able to build windows dist packages on linux
winX64jdk = readJdk("winX64jdk")
// Defines the path to a LINUX JDK, to be able to build linux dist packages on windows
linuxX64jdk = readJdk("linuxX64jdk")
// Defines the path to a LINUX AARCH64 JSK, to be able to build arm packages
linuxAarch64jdk = readJdk("linuxAarch64jdk")
// build SNAPSHOT replacement where needed.
buildDate = new Date().format('yyyyMMddHHmm')
// all java projects. these projects are pre-configured by the root project with a ton of helpers.
actualSubprojects = subprojects - [ project(':test-data'), project(':doc') ];
}
allprojects {
version = new File(rootProject.projectDir, "/bdeploy.version").text
group = 'io.bdeploy'
repositories {
mavenCentral()
}
}
tasks.register('printVersion') {
doLast {
println version
}
}
tasks.register('setVersion') {
doFirst {
if (!project.hasProperty('targetVersion')) {
throw new RuntimeException("Need to set property targetVersion");
}
}
doLast {
new File(projectDir, "/bdeploy.version").text = project.getProperty('targetVersion');
}
}
configure(actualSubprojects) {
apply plugin: 'java'
apply plugin: 'java-test-fixtures'
apply plugin: 'jacoco'
apply plugin: 'com.adarshr.test-logger'
apply plugin: 'eclipse'
apply plugin: 'net.ossindex.audit'
apply plugin: 'org.kordamp.gradle.project-enforcer'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
compileTestFixturesJava.options.encoding = 'UTF-8'
java {
// enabled by default in gradle 7.0 - breaks executing anything from eclipse, but not from the CLI
modularity.inferModulePath = false
}
eclipse {
classpath {
downloadSources = true
}
}
eclipse.project {
natures 'org.eclipse.xtext.ui.shared.xtextNature'
buildCommand 'org.eclipse.xtext.ui.shared.xtextBuilder'
}
java {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
configurations {
commonTestDeps
testFixturesImplementation {
extendsFrom commonTestDeps
}
testImplementation {
extendsFrom commonTestDeps
}
}
dependencies {
commonTestDeps platform('org.junit:junit-bom:5.13.4')
commonTestDeps 'org.junit.jupiter:junit-jupiter'
commonTestDeps 'org.hamcrest:hamcrest-core:3.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
eclipseJdt.doLast {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8')
}
audit {
rateLimitAsError = false
failOnError = false
ignore = [
'org.dom4j:dom4j:2.1.0' // introduced by spotbugs, which is not part of the distribution
]
}
jacocoTestReport {
mustRunAfter "test"
executionData fileTree(dir: layout.buildDirectory.dir("jacoco").get().asFile).matching { include '*.exec' }
}
testlogger {
showStandardStreams = true
showFailedStandardStreams = true
if(project.hasProperty('verboseTest')) {
showPassedStandardStreams = true
showSkippedStandardStreams = true
theme = 'standard'
} else {
showPassedStandardStreams = false
showSkippedStandardStreams = false
theme = 'mocha-parallel'
}
slowThreshold = 6000
showFullStackTraces = true
}
test {
useJUnitPlatform()
if(!project.hasProperty('verboseTest')) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
maxHeapSize = "2g"
testLogging {
reports.html.required = false
}
if(project.hasProperty("test.hive.override")) {
systemProperty "test.hive.override", project.getProperty("test.hive.override")
}
if(project.hasProperty("test.manifestName.override")) {
systemProperty "test.manifestName.override", project.getProperty("test.manifestName.override")
}
rootProject.updateJavaPath(test)
}
tasks.register('sourcesJar', Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allJava
}
tasks.register('javadocJar', Jar) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
dependsOn javadoc
}
javadoc {
options.encoding = 'UTF-8'
options.addBooleanOption('html5', true)
options.addStringOption('Xdoclint:-missing', '-quiet')
}
// custom JDT preferences, includes formatter, save actions, source compliance (!).
eclipseJdt.doLast {
file('.settings/org.eclipse.jdt.core.prefs').withWriter { writer ->
// file is specific for sourceCompatibility which can be overruled in each project build.gradle
writer << file("${rootDir}/templates/org.eclipse.jdt.core.prefs-${java.sourceCompatibility}").text
}
file('.settings/org.eclipse.jdt.ui.prefs').withWriter { writer ->
writer << file("${rootDir}/templates/org.eclipse.jdt.ui.prefs").text
}
}
tasks.register('cleanCustomEclipseJdt', Delete) {
delete ".settings/org.eclipse.jdt.ui.prefs"
}
cleanEclipseJdt.finalizedBy cleanCustomEclipseJdt
}
configure([project(':minion'), project(':launcher')]) {
tasks.register('genVersionProperties') {
def prjName = project.name
def buildDir = layout.buildDirectory.asFile.get()
outputs.upToDateWhen { false }
outputs.file "$buildDir/resources/main/version.properties"
doLast {
file("$buildDir/resources/main").mkdirs()
file("$buildDir/resources/main/version.properties").withWriter { w ->
def p = new Properties()
p['project'] = prjName
p['snapshot'] = version.contains('SNAPSHOT') ? 'true' : 'false'
p['version'] = version.replaceAll('SNAPSHOT', rootProject.ext.buildDate)
p['minSourceVersion'] = minSourceServerVersion
p.store w, null
}
}
}
tasks.register('genLinuxX64VersionProperties') {
dependsOn genVersionProperties
def buildDir = layout.buildDirectory.asFile.get()
outputs.upToDateWhen { false }
outputs.file "$buildDir/resources/linuxX64/version.properties"
doLast {
file("$buildDir/resources/linuxX64").mkdirs()
file("$buildDir/resources/linuxX64/version.properties").withWriter { w ->
def p = new Properties()
file("$buildDir/resources/main/version.properties").withInputStream { is -> p.load is }
p['os'] = 'LINUX' // literal of OperatingSystem
p.store w, null
}
}
}
tasks.register('genLinuxAarch64VersionProperties') {
dependsOn genVersionProperties
def buildDir = layout.buildDirectory.asFile.get()
outputs.upToDateWhen { false }
outputs.file "$buildDir/resources/linuxAarch64/version.properties"
doLast {
file("$buildDir/resources/linuxAarch64").mkdirs()
file("$buildDir/resources/linuxAarch64/version.properties").withWriter { w ->
def p = new Properties()
file("$buildDir/resources/main/version.properties").withInputStream { is -> p.load is }
p['os'] = 'LINUX_AARCH64' // literal of OperatingSystem
p.store w, null
}
}
}
tasks.register('genWinX64VersionProperties') {
dependsOn genVersionProperties
def buildDir = layout.buildDirectory.asFile.get()
outputs.upToDateWhen { false }
outputs.file "$buildDir/resources/winX64/version.properties"
doLast {
file("$buildDir/resources/winX64").mkdirs()
file("$buildDir/resources/winX64/version.properties").withWriter { w ->
def p = new Properties()
file("$buildDir/resources/main/version.properties").withInputStream { is -> p.load is }
p['os'] = 'WINDOWS' // literal of OperatingSystem
p.store w, null
}
}
}
processResources.dependsOn genLinuxX64VersionProperties
processResources.dependsOn genLinuxAarch64VersionProperties
processResources.dependsOn genWinX64VersionProperties
}
def void addMultiPlatformDistBuild(Project prj) {
prj.startScripts {
inputs.dir "${rootProject.projectDir}/templates/scripts"
// copied from https://github.com/gradle/gradle/tree/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins
unixStartScriptGenerator.template = resources.text.fromFile("${rootProject.projectDir}/templates/scripts/unixUpdateStartScript.txt")
windowsStartScriptGenerator.template = resources.text.fromFile("${rootProject.projectDir}/templates/scripts/windowsUpdateStartScript.txt")
if(prj.ext.has('scriptDefVmArgs')) {
defaultJvmOpts = prj.ext.get('scriptDefVmArgs')
}
}
prj.distributions {
linuxX64 {
contents {
with prj.distributions.main.getContents()
from rootProject.jlinkLinuxX64.outputs
from prj.genLinuxX64VersionProperties.outputs
}
}
linuxAarch64 {
contents {
with prj.distributions.main.getContents()
from rootProject.jlinkLinuxAarch64.outputs
from prj.genLinuxAarch64VersionProperties.outputs
}
}
winX64 {
contents {
with prj.distributions.main.getContents()
from rootProject.jlinkWinX64.outputs
from prj.genWinX64VersionProperties.outputs
}
}
}
// don't build the ZIP dist without any JVM
prj.distZip.enabled = false
// no tar files at all, please
prj.distTar.enabled = false
prj.linuxX64DistTar.enabled = false
prj.linuxAarch64DistTar.enabled = false
prj.winX64DistTar.enabled = false
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
if(isAarch64()) {
prj.build.dependsOn prj.linuxAarch64DistZip
prj.installDist.dependsOn prj.installLinuxAarch64Dist
if(!hasWinX64Jdk()) {
prj.winX64DistZip.enabled = false
}
if(!hasLinuxX64Jdk()) {
prj.linuxX64DistZip.enabled = false
}
} else {
prj.build.dependsOn prj.linuxX64DistZip
prj.installDist.dependsOn prj.installLinuxX64Dist
if(!hasWinX64Jdk()) {
prj.winX64DistZip.enabled = false
}
if(!hasLinuxAarch64Jdk()) {
prj.linuxAarch64DistZip.enabled = false
}
}
} else if(org.gradle.internal.os.OperatingSystem.current().isWindows()) {
prj.build.dependsOn prj.winX64DistZip
prj.installDist.dependsOn prj.installWinX64Dist
if(!hasLinuxX64Jdk()) {
prj.linuxX64DistZip.enabled = false
}
if(!hasLinuxAarch64Jdk()) {
prj.linuxAarch64DistZip.enabled = false
}
}
prj.installLinuxX64Dist.doFirst {
delete "$destinationDir"
}
prj.installLinuxAarch64Dist.doFirst {
delete "$destinationDir"
}
prj.installWinX64Dist.doFirst {
delete "$destinationDir"
}
}
tasks.register('testReport', TestReport) {
destinationDirectory = layout.buildDirectory.dir("reports/tests")
// Include the results from the `test` task in all subprojects
testResults.from(actualSubprojects*.test*.binaryResultsDirectory)
}
tasks.register('genJavaDoc', Javadoc) {
source = actualSubprojects*.sourceSets.main.allJava
destinationDir = reporting.file("javadoc")
classpath = files(actualSubprojects*.sourceSets.main.compileClasspath)
options.encoding = 'UTF-8'
options.addBooleanOption('html5', true)
options.addStringOption('Xdoclint:-missing', '-quiet')
}
build.finalizedBy genJavaDoc
def isNonStable = { String version ->
// -jre for guava
def stableKeyword = ['RELEASE', 'FINAL', 'GA', '-JRE'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
dependencyUpdates {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
private boolean hasWinX64Jdk() {
return file("$winX64jdk/bin/java.exe").exists();
}
private boolean hasLinuxX64Jdk() {
return file("$linuxX64jdk/lib/libjava.so").exists();
}
public boolean hasLinuxAarch64Jdk() {
return file("$linuxAarch64jdk/lib/libjava.so").exists();
}
private String readJdk(String which) {
def v = System.getProperty(which)
if(v != null) {
println("Using " + which + " from " + v);
return v;
}
// only return running jdk on the correct platform.
if(which.equals("win-x64jdk") && org.gradle.internal.os.OperatingSystem.current().isLinux()) {
return null;
}
if(which.equals("linux-x64jdk") && (!org.gradle.internal.os.OperatingSystem.current().isLinux() || isAarch64())) {
return null;
}
if(which.equals("linux-aarch64jdk") && (!org.gradle.internal.os.OperatingSystem.current().isLinux() || !isAarch64())) {
return null;
}
// we're native here, so return the running java
return System.getProperty("java.home")
}
public boolean isAarch64() {
return currentArch.equalsIgnoreCase("aarch64");
}
private void updateJavaPath(ProcessForkOptions options) {
def rootBuild = rootProject.layout.buildDirectory
if(org.gradle.internal.os.OperatingSystem.current().isLinux()) {
if(isAarch64()) {
options.executable = rootBuild.file("jlink/linuxAarch64/jre/bin/java").get().asFile.path
} else {
options.executable = rootBuild.file("jlink/linuxX64/jre/bin/java").get().asFile.path
}
} else if(org.gradle.internal.os.OperatingSystem.current().isWindows()) {
options.executable = rootBuild.file("jlink/winX64/jre/bin/java.exe").get().asFile.path
}
}
ext.configureJlink = { task, String modHome, Provider<Directory> outDir ->
configure(task) {
outputs.dir outDir
def linkExec
if(org.gradle.internal.os.OperatingSystem.current().isLinux()) {
if(isAarch64()) {
linkExec = [ "$linuxAarch64jdk/bin/jlink", "--module-path", "$modHome/jmods:mlib" ]
} else {
linkExec = [ "$linuxX64jdk/bin/jlink", "--module-path", "$modHome/jmods:mlib" ]
}
} else if(org.gradle.internal.os.OperatingSystem.current().isWindows()) {
linkExec = [ "$winX64jdk\\bin\\jlink.exe", "--module-path", "$modHome\\jmods;mlib" ]
}
// find required modules with this command:
// $JAVA_HOME/bin/jdeps -summary *.jar | awk '{ print $3 }' | sort -u
commandLine ( linkExec + [
"--output", "${outDir.get().asFile}/jre",
"--compress=zip-9", "--no-header-files", "--no-man-pages",
"--add-modules",
"java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.naming,java.sql,java.xml,java.rmi,jdk.crypto.ec,jdk.jdwp.agent,jdk.jdi,jdk.zipfs,jdk.jcmd,jdk.management"
])
doFirst {
delete outDir
}
}
}
tasks.register('jlinkLinuxX64', Exec) { t ->
configureJlink(t, "$linuxX64jdk", layout.buildDirectory.dir("jlink/linuxX64"))
doFirst {
if (!hasLinuxX64Jdk()) {
throw new InvalidUserDataException("$linuxX64jdk does not seem to be a linux x64 JDK, please set -Plinux-x64jdk=c:/path/to/jdk")
}
}
}
tasks.register('jlinkLinuxAarch64', Exec) { t ->
configureJlink(t, "$linuxAarch64jdk", layout.buildDirectory.dir("jlink/linuxAarch64"))
doFirst {
if (!hasLinuxAarch64Jdk()) {
throw new InvalidUserDataException("$linuxAarch64jdk does not seem to be a linux aarch64 JDK, please set -Plinux-aarch64jdk=c:/path/to/jdk")
}
}
}
tasks.register('jlinkWinX64', Exec) { t ->
configureJlink(t, "$winX64jdk", layout.buildDirectory.dir("jlink/winX64"))
doFirst {
if (!hasWinX64Jdk()) {
throw new InvalidUserDataException("$winX64jdk does not seem to be a windows JDK, please set -Pwin-x64jdk=/path/to/jdk")
}
}
doLast {
String base = layout.buildDirectory.dir("jlink/winX64/jre").get().asFile.getPath();
layout.buildDirectory.dir("jlink/winX64/jre").get().asFileTree.matching {
include "**/*.exe"
include "**/*.dll"
}.each {
String rel = it.getPath().substring(base.length() + 1);
File src = new File("$winX64jdk", rel);
if (src.exists()) {
Files.copy(src.toPath(), it.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
}
}
}
tasks.register('jlinkAny') {
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
if (isAarch64()) {
dependsOn jlinkLinuxAarch64
} else {
dependsOn jlinkLinuxX64
}
} else if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
dependsOn jlinkWinX64
}
}
actualSubprojects*.test {
dependsOn rootProject.tasks["jlinkAny"]
}
tasks.register('release') {
doFirst {
if (version.contains('SNAPSHOT')) {
throw new RuntimeException("Cannot release a SNAPSHOT: " + version);
}
if (!hasWinX64Jdk()) {
throw new RuntimeException("Cannot release without a WINDOWS x64 JDK");
}
if (!hasLinuxX64Jdk()) {
throw new RuntimeException("Cannot release without a LINUX x64 JDK");
}
if (!hasLinuxAarch64Jdk()) {
throw new RuntimeException("Cannot release without a LINUX aarch64 JDK");
}
}
}
evaluationDependsOnChildren()
tasks.register('jacocoFullReport', JacocoReport) {
dependsOn actualSubprojects*.test
getAdditionalSourceDirs().from(files(actualSubprojects.sourceSets.main.allSource.srcDirs))
getSourceDirectories().from(files(actualSubprojects.sourceSets.main.allSource.srcDirs))
getClassDirectories().from(files(actualSubprojects.sourceSets.main.output))
rootProject.getAllTasks(true).each { p, tasks ->
if (p.name == 'interfaces' || p.name == 'launcher' || p.name == 'ui' || p.name == 'api' || p.name == 'logging') {
return; // no tests run in there right now.
}
tasks.each {
if (!it.enabled) {
return;
}
def x = it.getExtensions().findByType(JacocoTaskExtension);
if (x != null) {
getExecutionData().from(x.destinationFile);
}
}
}
reports {
xml.required = true
xml.outputLocation = layout.buildDirectory.file("reports/jacoco/jacocoFullReport/jacocoFullReport.xml")
}
onlyIf = {
true
}
}
tasks.register('test') {
dependsOn actualSubprojects*.test
finalizedBy testReport
finalizedBy jacocoFullReport
}
sonarqube {
properties {
property "sonar.projectKey", "bdeployteam_bdeploy"
property "sonar.coverage.jacoco.xmlReportPaths", layout.buildDirectory.file("reports/jacoco/jacocoFullReport/jacocoFullReport.xml").get().asFile.path
property "sonar.verbose", "true"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.organization", "bdeployteam"
}
}
project.tasks["sonarqube"].dependsOn build
project.tasks["sonarqube"].dependsOn jacocoFullReport
build.dependsOn test
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
if(isAarch64()) {
if(!hasLinuxX64Jdk()) {
logger.warn("No linux x64 JDK available, skipping linux x64 distribution")
jlinkLinuxX64.enabled = false
}
} else {
if(!hasLinuxAarch64Jdk()) {
logger.warn("No linux aarch64 JDK available, skipping linux aarch64 distribution")
jlinkLinuxAarch64.enabled = false
}
}
// need special JDK for win64 as module input dir
if(!hasWinX64Jdk()) {
logger.warn("No windows x64 JDK available, skipping windows x64 distribution")
jlinkWinX64.enabled = false
}
} else if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
// need special JDK for linux64 as module input dir
if(!hasLinuxX64Jdk()) {
logger.warn("No linux x64 JDK available, skipping linux x64 distribution")
jlinkLinuxX64.enabled = false
}
if(!hasLinuxAarch64Jdk()) {
logger.warn("No linux aarch64 JDK available, skipping linux aarch64 distribution")
jlinkLinuxAarch64.enabled = false
}
}