-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
114 lines (95 loc) · 2.93 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
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.10'
id 'org.beryx.jlink' version '2.24.1'
id 'checkstyle'
id 'jacoco'
id 'org.sonarqube' version '3.3'
}
group 'edu.kit.rose'
version '1.0'
repositories {
mavenCentral()
}
ext {
junitVersion = '5.8.2'
}
sourceCompatibility = '17'
targetCompatibility = '17'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'edu.kit.rose'
mainClass = 'edu.kit.rose.view.RoseApplication'
}
checkstyle {
toolVersion = '8.45'
}
javafx {
version = '17.0.1'
modules = ['javafx.controls', 'javafx.fxml']
}
dependencies {
implementation('com.google.inject:guice:5.1.0')
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.1'
implementation('org.jgrapht:jgrapht-core:1.5.1')
implementation 'junit:junit:4.13.2'
implementation('ch.qos.logback:logback-classic:1.2.10')
implementation 'javax.servlet:javax.servlet-api:4.0.1' // required for logback
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testImplementation('org.mockito:mockito-core:4.3.1')
testImplementation ('org.testfx:testfx-junit5:4.0.15-alpha')
}
test {
useJUnitPlatform()
//Options for TestFX
jvmArgs = [
'--add-opens', "$moduleName/edu.kit.rose=org.testfx.junit5",
'--add-opens', "$moduleName/edu.kit.rose.view.panel.segmentbox=org.testfx.junit5",
'--add-opens', "javafx.graphics/com.sun.javafx.application=org.testfx",
'--add-exports', "$moduleName/edu.kit.rose=org.junit.platform.engine",
'--add-exports', "$moduleName/edu.kit.rose.model.roadsystem.attributes" +
"=org.junit.platform.engine"
]
//minHeapSize="4g"
//maxHeapSize="4g"
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(it)
.exclude("edu/kit/rose/view")
.exclude("edu/kit/rose/controller/measurement")
.exclude("edu/kit/rose/model/roadsystem/measurements")
}))
}
}
jlink {
imageZip = project.file("${buildDir}/distributions/ROSE-${javafx.platform.classifier}.zip")
jpackage {
icon = file("src/main/resources/logo.ico")
imageOptions = ['--win-console']
}
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'ROSE'
}
}
jlinkZip {
group = 'distribution'
}
sonarqube {
properties {
property "sonar.projectKey", "psege_rose_AX9hHSxrKw6c9ZNKKE-D"
property "sonar.qualitygate.wait", true
}
}