-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
65 lines (56 loc) · 1.69 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
plugins {
id("application")
id("java")
id("jacoco")
}
group = "org.longbox"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
application {
mainClass = "org.longbox.Main"
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
implementation("com.toedter:jcalendar:1.4")
implementation("com.jgoodies:jgoodies-forms:1.8.0")
implementation("org.hibernate:hibernate-core:6.4.2.Final")
implementation("org.postgresql:postgresql:42.7.1")
implementation("jakarta.mail:jakarta.mail-api:2.1.2")
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
implementation("com.google.code.gson:gson:2.10.1")
implementation("commons-validator:commons-validator:1.8.0")
testImplementation("org.mockito:mockito-core:2.1.0")
}
tasks.named<Test>("test") {
useJUnitPlatform()
maxHeapSize = "1G"
testLogging {
events("passed")
}
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.named<Test>("test")) // tests are required to run before generating the report
classDirectories.setFrom(files(classDirectories.files.map {
fileTree(it) {
setExcludes(listOf(
"**/controller/*",
"**/presentation/*"
))
}
}))
reports {
xml.required = true
csv.required = true
html.required = true
html.outputLocation = layout.buildDirectory.dir("jacoco-reports")
}
}
jacoco {
toolVersion = "0.8.11"
reportsDirectory = layout.buildDirectory.dir("jacoco-reports")
}