-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
67 lines (59 loc) · 1.63 KB
/
build.gradle.kts
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
group = "ch.peters.daniel"
version = "1.0"
plugins {
java
application
groovy
}
application {
applicationName = "adventuregame"
mainClassName = "${project.group}.$applicationName.App"
}
var currentOS = org.gradle.internal.os.OperatingSystem.current()!!
var platform = when {
currentOS.isWindows -> "win"
currentOS.isLinux -> "linux"
currentOS.isMacOsX -> "max"
else -> ""
}
dependencies {
implementation("org.openjfx:javafx-base:11:$platform")
implementation("org.openjfx:javafx-graphics:11:$platform")
implementation("org.openjfx:javafx-controls:11:$platform")
implementation("org.openjfx:javafx-fxml:11:$platform")
implementation("com.jfoenix:jfoenix:9.0.8")
testImplementation("org.codehaus.groovy:groovy-all:2.5.5")
testImplementation("org.spockframework:spock-core:1.2-groovy-2.5")
testImplementation("junit:junit:4.12")
}
repositories {
jcenter()
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_10
targetCompatibility = JavaVersion.VERSION_1_10
}
tasks.withType<JavaCompile> {
doFirst {
options.compilerArgs = listOf(
"--module-path", classpath.asPath,
"--add-modules", "javafx.base",
"--add-modules", "javafx.controls",
"--add-modules", "javafx.fxml",
"--add-modules", "javafx.graphics",
"--add-modules", "com.jfoenix"
)
}
}
tasks.withType<JavaExec> {
doFirst {
jvmArgs = listOf(
"--module-path", classpath.asPath,
"--add-modules", "javafx.base",
"--add-modules", "javafx.controls",
"--add-modules", "javafx.fxml",
"--add-modules", "javafx.graphics",
"--add-modules", "com.jfoenix"
)
}
}