-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
41 lines (35 loc) · 1.56 KB
/
build.gradle
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
plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.30"
id "org.beryx.runtime" version "1.12.5"
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation group: "com.beust", name: "jcommander", version: jcommanderVersion
implementation group: "com.beust", name: "klaxon", version: klaxonVersion
}
compileJava.destinationDir = compileKotlin.destinationDir
compileKotlin { kotlinOptions.jvmTarget = "11" }
application {
mainClass.set("com.fwdekker.falloutcurvetables.MainKt")
}
runtime {
// Options
imageZip.set(project.file("${project.buildDir}/image/falloutcurvetables-${project.version}.zip"))
options.set(["--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"])
modules.set(["java.base"])
// Targets
def jdkDir = System.getenv().getOrDefault("JLINK_JDK_DIR", null)
// Find latest versions at https://adoptopenjdk.net/releases.html
[
"linux-x64" : "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz",
"mac-x64" : "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.12_7.zip",
"windows-x64": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.12_7.tar.gz",
].each { platform, jdkUrl ->
targetPlatform(platform) {
jdkHome = jdkDownload(jdkUrl) { if (jdkDir != null) downloadDir = "${jdkDir}/${platform}/" }
}
}
}