-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (110 loc) · 4.26 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Windows: set JAVA_HOME=C:\Program Files\Java\jdk-11.0.5+10
// Windows: set JAVA_HOME=C:\Program Files\Java\jdk-16+36
// MacOS: export JAVA_HOME=`/usr/libexec/java_home -v 11`
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.beryx.runtime' version '1.12.7'
id 'org.unbroken-dome.xjc' version '2.0.0'
}
dependencies {
// ControlsFX
implementation('org.controlsfx:controlsfx:11.1.2') {
exclude group: 'org.openjfx', module: '*'
}
// Math
implementation 'com.udojava:EvalEx:2.7'
implementation 'com.ibm.icu:icu4j:73.2'
// Apache POI
implementation 'org.apache.poi:poi-ooxml:4.0.1'
// Jasperreports
implementation 'net.sf.jasperreports:jasperreports:6.16.0'
implementation 'net.sf.jasperreports:jasperreports-fonts:6.16.0'
implementation 'com.lowagie:itext:2.1.7'
// JAXB and XML Diff
implementation 'org.xmlunit:xmlunit-core:2.8.1'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3'
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.3'
implementation 'org.junit.jupiter:junit-jupiter:5.7.0'
// test dependencies
testImplementation("org.junit.jupiter:junit-jupiter:5.7.2")
testImplementation 'de.sandec:JMemoryBuddy:0.5.1'
}
repositories {
mavenCentral()
}
test {
// Enable JUnit 5
useJUnitPlatform()
}
java {
modularity.inferModulePath.set(false)
}
javafx {
version = '17-ea+16' // '16' // '14.0.2.1'
modules = ['javafx.controls']
}
xjc {
// srcDirName = 'src/main/resources'
}
version = '21.07.29'
def company = 'My Company'
mainClassName = "com.example.hellofx.Launcher"
applicationName = 'hello-fx'
application {
applicationDefaultJvmArgs = [
// necessary for ControlsFX
"--add-opens=javafx.base/com.sun.javafx.event=ALL-UNNAMED",
"--add-opens=javafx.base/com.sun.javafx.collections=ALL-UNNAMED",
"--add-opens=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED",
"--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED",
"--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED",
// necessary for Jasperreports XML parsing
// https://github.com/TIBCOSoftware/jasperreports/issues/61
"--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED",
]
}
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
jpackage {
imageName = applicationName // "hello-fx"
installerName = applicationName
// Set the environment property BADASS_JLINK_JPACKAGE_HOME or explicitly configure the below property
def os = org.gradle.internal.os.OperatingSystem.current()
/* if(os.macOsX) {
// jpackageHome = '/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home'
jpackageHome = '/Library/Java/JavaVirtualMachines/jdk-17-b-32.jdk/Contents/Home'
} else if(os.windows) {
jpackageHome = 'C:/Program Files/Java/jdk-16+36'
} else {
// Linux
jpackageHome = '/usr/lib/jvm/jdk-16'
} */
jvmArgs = []
installerOptions = [
// '--file-associations', 'src/main/resources/associations.properties',
'--app-version', version,
'--vendor', company,
'--copyright', company,
]
if(os.macOsX) {
imageOptions = ['--mac-sign', '--icon', 'src/main/deploy/package/macosx/hello.icns']
installerOptions += [
// '--mac-sign',
// '--mac-signing-key-user-name', System.getenv('SIGNING_KEY_USER_NAME'),
// '--mac-signing-keychain', System.getenv('SIGNING_KEYCHAIN_PATH')
]
} else if(os.windows) {
imageOptions = ['--icon', 'src/main/deploy/package/windows/hello.ico']
installerType = 'msi'
installerOptions += [
'--win-per-user-install',
'--win-menu',
'--win-menu-group', company,
'--win-shortcut',
]
}
}
}