-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
55 lines (47 loc) · 1.58 KB
/
build.gradle
File metadata and controls
55 lines (47 loc) · 1.58 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
plugins {
id 'org.beryx.runtime' version '1.12.5'
}
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'
}
application {
mainClass = 'org.beryx.nonmodular.hello.Hello'
applicationName = 'hello'
applicationDefaultJvmArgs = ['-Dlogback.configurationFile=$APPDIR/logback.xml']
}
jar {
manifest {
attributes 'Implementation-Title': "non-modular-hello",
'Main-Class': 'org.beryx.nonmodular.hello.Hello'
}
}
runtime {
modules = ['java.naming', 'java.xml']
jpackage {
def currentOs = org.gradle.internal.os.OperatingSystem.current()
if(currentOs.windows) {
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
imageOptions = ['--win-console']
} else if (currentOs.linux) {
installerOptions += ['--linux-package-name', 'non-modular-hello','--linux-shortcut']
} else if (currentOs.macOsX) {
installerOptions += ['--mac-package-name', 'non-modular-hello']
installerType = 'dmg'
}
}
}
tasks.jpackage.doFirst {
def currentOs = org.gradle.internal.os.OperatingSystem.current()
def basePath = currentOs.windows ? project.name : currentOs.linux ? "$project.name/lib" : "${project.name}.app/Contents"
copy {
from('src/main/resources')
into("$buildDir/jpackage/$basePath/app")
}
}