-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
51 lines (42 loc) · 1.04 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
kotlin("jvm")
jacoco
}
group = "io.petproject"
version = "2.0-SNAPSHOT"
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
val kotestVersion: String by project
implementation(kotlin("stdlib"))
testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
}
kotlin {
jvmToolchain(21)
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
csv.required.set(false)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
tasks.jacocoTestCoverageVerification {
classDirectories.setFrom(
sourceSets.main.get().output.asFileTree.matching {
exclude("io/petproject/utils/*.class")
}
)
}