-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (76 loc) · 2.52 KB
/
build.gradle
File metadata and controls
87 lines (76 loc) · 2.52 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
plugins {
id 'java'
id 'idea'
id 'application'
// Exception in thread "main" java.lang.NoClassDefFoundError: picocli.CommandLine
// @see https://stackoverflow.com/a/73107093
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.graalvm.buildtools.native' version '0.9.14'
}
version = '3.4.5'
group = 'dev.appkr'
sourceCompatibility = '8'
repositories {
mavenCentral()
}
dependencies {
implementation 'info.picocli:picocli:4.6.3'
annotationProcessor 'info.picocli:picocli-codegen:4.6.3'
implementation 'com.github.spullara.mustache.java:compiler:0.9.10'
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.13.1.202206130422-r'
implementation 'ch.qos.logback:logback-classic:1.2.9'
}
compileJava {
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
}
application {
mainClass = 'dev.appkr.starter.MsaStarter'
}
jar {
manifest {
attributes('Main-Class': 'dev.appkr.starter.MsaStarter')
}
}
graalvmNative {
// Reference: https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html#configuration-options
agent {
// 'agent' means 'native-image-agent' which is provided by GraalVM
defaultMode = "standard"
// ./gradlew nativeCompile -DgraalvmNative.agent.enabled=true
enabled = false
modes {
standard {
}
}
builtinCallerFilter = true
builtinHeuristicFilter = true
enableExperimentalPredefinedClasses = false
enableExperimentalUnsafeAllocationTracing = false
trackReflectionMetadata = true
metadataCopy {
outputDirectories.add("src/main/resources/META-INF/native-image")
mergeWithExisting = true
}
}
binaries {
main {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.matching("GraalVM Community")
}
mainClass = 'dev.appkr.starter.MsaStarter'
fallback = false
debug = true
verbose = true
// 'useFatJar' makes the following error, but was not able to find right answer from
// References: https://github.com/edvin/tornadofx-idea-plugin/issues/18, https://stackoverflow.com/a/14441628
// "Fatal error: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes"
// useFatJar = true
}
}
}
tasks.register('printVersion') {
doLast {
println project.version
}
}