-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
44 lines (32 loc) · 1000 Bytes
/
build.gradle
File metadata and controls
44 lines (32 loc) · 1000 Bytes
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
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.6'
}
application {
// Define the main class for the application.
mainClassName = 'Start'
}
javafx {
modules = ["javafx.controls", "javafx.fxml", "javafx.web"]
}
run {
jvmArgs = ['--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED']
}
task unzip(type: Copy, dependsOn: distZip) {
def zipPath = "${buildDir}/distributions/DesktopApplication.zip"
def zipFile = file(zipPath)
def outputDir = file("${buildDir}/distributions")
from zipTree(zipFile)
into outputDir
}
task makeInstaller(type:Exec, dependsOn: unzip) {
/*Java 14+ needed*/
workingDir "build/distributions/DesktopApplication"
commandLine "cmd", "/c", "jpackage -i lib -n StudyTool --main-class Start --main-jar DesktopApplication.jar --win-dir-chooser --win-shortcut"
}