-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (103 loc) · 2.64 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
plugins {
id 'application'
id 'java'
id 'org.openjfx.javafxplugin' version '0.0.10'
id 'checkstyle'
//id "org.beryx.jlink" version "2.24.4" //uncomment for jlink
}
group 'edu.uoc'
version '1.0'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
repositories {
mavenCentral()
}
javafx {
version = "17.0.1"
modules = [ 'javafx.controls', 'javafx.fxml']
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-params:5.8.2'
}
test {
useJUnitPlatform()
jvmArgs = ['--add-modules', 'org.junit.platform.engine']
}
javadoc{
options.memberLevel = JavadocMemberLevel.PRIVATE
options.encoding = "UTF-8"
options.author = true
destinationDir = file("docs")
}
task runCmdVersion(type: JavaExec) {
group = "Execution"
standardInput = System.in
description = "Run the cmd version"
classpath = sourceSets.main.runtimeClasspath
mainClass = "edu.uoc.trip.view.cmd.CmdApp"
}
task runGuiVersion(type: JavaExec) {
group = "Execution"
description = "Run the GUI version"
classpath = sourceSets.main.runtimeClasspath
jvmArgs = ['--module-path', classpath.asPath,
'--add-modules', 'javafx.controls',
'--add-modules', 'javafx.fxml']
mainClass = "edu.uoc.trip.view.gui.GuiApp"
}
task testSanity(type: Test) {
group = "Verification"
useJUnitPlatform {
includeTags "sanity"
}
}
task testMinimum(type: Test) {
group = "Verification"
useJUnitPlatform {
includeTags "minimum"
}
}
task testPassPractice(type: Test) {
group = "Verification"
useJUnitPlatform {
includeTags "sanity", "minimum"
}
}
task testAdvanced(type: Test) {
group = "Verification"
useJUnitPlatform {
includeTags "advanced"
}
}
task testController(type: Test) {
group = "Verification"
useJUnitPlatform {
includeTags "controller"
}
}
task testAll(type:Test){
group = "Verification"
useJUnitPlatform {
includeTags "sanity", "minimum", "advanced", "controller"
}
}
jar {
manifest {
attributes (
'Main-Class' : 'edu.uoc.trip.view.gui.Main'
)
}
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it) }
} {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
application{
mainModule = "edu.uoc.trip"
mainClassName = "edu.uoc.trip.view.gui.Main"
}