-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
146 lines (117 loc) · 4.58 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import org.panteleyev.jpackage.ImageType
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'org.openjfx.javafxplugin' version '0.0.13'
id "com.github.ManifestClasspath" version "0.1.0-RELEASE"
id 'org.bytedeco.gradle-javacpp-platform' version "$javacppVersion"
id 'application'
id "org.panteleyev.jpackageplugin" version "1.4.1"
}
group 'ch.zhdk.tracking'
version '1.3.2'
ext.ktor_version = '1.2.2'
def defaultJvmArgs = ''
def applicationJvmArgs = ["-Djava.library.path=$defaultJvmArgs",
"--add-opens", "javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED",
"--add-opens", "javafx.graphics/javafx.stage=ALL-UNNAMED",
"--add-opens", "javafx.graphics/com.sun.javafx.tk.quantum=ALL-UNNAMED",
"--add-opens", "javafx.graphics/com.sun.javafx.application=ALL-UNNAMED",
"--add-opens", "javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED",
"--add-opens", "javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED",
"--add-opens", "javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED",
"--add-opens", "javafx.graphics/com.sun.glass.ui=ALL-UNNAMED"]
wrapper {
gradleVersion = '7.4.1'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip"
}
compileJava {
sourceCompatibility = 11
targetCompatibility = 11
}
compileKotlin {
sourceCompatibility = 11
targetCompatibility = 11
}
javafx {
version = "18"
modules = ['javafx.controls', 'javafx.fxml', 'javafx.swing']
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation group: 'junit', name: 'junit', version: '4.12'
// javacv
implementation group: 'org.bytedeco', name: 'javacv', version: "$javacppVersion"
implementation group: 'org.bytedeco', name: 'opencv-platform', version: "4.5.5-$javacppVersion"
implementation group: 'org.bytedeco', name: 'openblas-platform', version: "0.3.19-$javacppVersion"
implementation group: 'org.bytedeco', name: 'librealsense2-platform', version: "2.50.0-$javacppVersion"
implementation group: 'org.bytedeco', name: 'ffmpeg-platform', version: "5.0-$javacppVersion"
// json
implementation group: 'com.google.code.gson', name: 'gson', version: '2.3.1'
implementation 'com.github.salomonbrys.kotson:kotson:2.5.0'
// javafx
implementation group: 'org.controlsfx', name: 'controlsfx', version: '11.1.1'
implementation group: 'com.sun.activation', name: 'javax.activation', version: '1.2.0'
// osc
implementation group: 'com.illposed.osc', name: 'javaosc-core', version: '0.7'
implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
// statistics
implementation 'org.nield:kotlin-statistics:1.2.1'
// bildspur libs
implementation "com.github.cansik:bildspur-base:0.3.5"
implementation 'com.github.cansik:bildspur-ui:0.4.2'
implementation 'com.github.cansik:ble-serial-bridge:5bf9f24e88'
// ktor
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "io.ktor:ktor-gson:$ktor_version"
implementation "io.ktor:ktor-locations:$ktor_version"
implementation "io.ktor:ktor-websockets:$ktor_version"
}
application {
applicationName = 'TouchTableIRTrackingSystem'
mainClass = 'ch.zhdk.tracking.Main'
applicationDefaultJvmArgs = applicationJvmArgs
}
jar {
manifest {
attributes "Main-Class": application.mainClass.get()
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task copyDependencies(type: Copy) {
from configurations.runtimeClasspath
into "$buildDir/jars"
}
task copyJar(type: Copy) {
from tasks.jar into "$buildDir/jars"
}
tasks.jpackage {
dependsOn {
build
copyDependencies
copyJar
}
input = "$buildDir/jars"
destination = "$buildDir/dist"
appName = "$application.applicationName"
vendor = "Zurich University of the Arts"
copyright = "Copyright (c) 2022 Zurich University of the Arts"
mainJar = jar.archiveFileName.get()
mainClass = application.mainClass.get()
javaOptions = ["-Dfile.encoding=UTF-8"]
mac {
icon = "data/icons.icns"
}
windows {
icon = "data/favicon-96x96.ico"
winConsole = true
type = ImageType.MSI
}
}