-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
77 lines (66 loc) · 1.99 KB
/
Copy pathbuild.gradle
File metadata and controls
77 lines (66 loc) · 1.99 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
plugins {
id "org.beryx.jlink" version "2.24.4"
id 'application'
// This is also imported by default when using the Open JavaFx gradle plugin
id "org.javamodularity.moduleplugin" version "1.8.10"
}
repositories {
mavenCentral()
}
sourceCompatibility = 11
targetCompatibility = 11
dependencies {
//
// Comment out
// `exclude module: 'resource-loader'`
// and
// 'implementation files('libs/resource-loader-2.0.2.jar')'
// to see the original resource-loader fails to load the bundled lazysodium
// library when run from Java module.
//
implementation('com.goterl:lazysodium-java:5.1.1') {
// Exclude resource-loader transitive dependency to test the modified
// version.
exclude module: 'resource-loader'
}
// Modified resource-loader that may load from class loader before attempting
// other methods.
implementation files('libs/resource-loader-2.0.2.jar')
implementation 'net.java.dev.jna:jna:5.9.0'
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'javax.xml.bind:jaxb-api:2.3.0'
}
application {
mainClass = 'org.beryx.modular.hello.Hello'
mainModule = 'org.beryx.modular.hello'
}
jar {
manifest {
attributes 'Implementation-Title': "modular-hello",
'Main-Class': 'org.beryx.modular.hello.Hello'
}
}
jlink {
mergedModule {
requires 'java.naming'
requires 'java.xml'
requires 'java.logging'
}
launcher{
name = 'hello'
jvmArgs = ['-Dlogback.configurationFile=./logback.xml']
}
jpackage {
if (org.gradle.internal.os.OperatingSystem.current().windows) {
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
imageOptions += ['--win-console']
}
}
}
tasks.jlink.doLast {
copy {
from('src/main/resources')
into("$buildDir/image/bin")
}
}