forked from beryx-gist/badass-jlink-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
43 lines (37 loc) · 912 Bytes
/
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
plugins {
id "org.beryx.jlink" version "2.16.4"
id "org.javamodularity.moduleplugin" version "1.6.0"
}
repositories {
mavenCentral()
}
sourceCompatibility = 11
targetCompatibility = 11
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'javax.xml.bind:jaxb-api:2.3.0'
}
mainClassName = 'org.beryx.modular.hello/org.beryx.modular.hello.Hello'
jar {
manifest {
attributes 'Implementation-Title': "modular-hello",
'Main-Class': 'org.beryx.modular.hello.Hello'
}
}
jlink {
mergedModule {
requires 'java.naming'
requires 'java.xml'
}
launcher{
name = 'hello'
jvmArgs = ['-Dlogback.configurationFile=./logback.xml']
}
}
tasks.jlink.doLast {
copy {
from('src/main/resources')
into("$buildDir/image/bin")
}
}