-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
75 lines (58 loc) · 2.45 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
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
plugins {
// Make an uber/fat executable jar
id 'com.github.johnrengelman.shadow' version '6.1.0'
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building a CLI application.
id 'application'
// Bundle a JRE with the distribution
id 'org.beryx.runtime' version '1.12.7'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is used by the application.
implementation 'com.google.guava:guava:29.0-jre'
// https://mvnrepository.com/artifact/org.worldcubeassociation.tnoodle/lib-scrambles
implementation 'org.worldcubeassociation.tnoodle:lib-scrambles:0.18.0'
// JCommander parses CLI args
// https://mvnrepository.com/artifact/com.beust/jcommander
implementation 'com.beust:jcommander:1.81'
// https://mvnrepository.com/artifact/org.json/json
implementation 'org.json:json:20210307'
// Use JUnit test framework
testImplementation 'junit:junit:4.13'
}
version = '1.0.0'
application {
// Define the main class for the application.
mainClassName = 'tnoodlecli.App'
applicationName = 'tnoodle'
}
task copyShadowJar(type: Copy) {
from ("$buildDir/libs/tnoodle-cli-$version-all.jar") {
rename '(.*)-all(.jar)', '$1$2'
}
into "$buildDir/releases/"
}
tasks.named("shadowJar") {
finalizedBy copyShadowJar
}
// See the docs here: https://badass-runtime-plugin.beryx.org/releases/latest/
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
imageDir = file("$buildDir/tnoodle-cli")
imageZip = file("$buildDir/releases/tnoodle-cli-$version" + ".zip")
targetPlatform("win_x64") {
jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_windows_openj9_11.0.11_9_openj9-0.26.0.zip")
}
targetPlatform("linux_x64") {
jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.11_9_openj9-0.26.0.tar.gz")
}
targetPlatform("mac_x64") {
jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9_openj9-0.26.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.11_9_openj9-0.26.0.tar.gz")
}
}