generated from Jadarma/advent-of-code-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
64 lines (55 loc) · 1.7 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.kotlin.dsl.KotlinClosure2
plugins {
kotlin("jvm") version "2.0.21"
}
kotlin {
jvmToolchain(17)
}
sourceSets {
main.configure {
kotlin.srcDir("$projectDir/solutions")
}
test.configure {
kotlin.srcDir("$projectDir/tests")
resources.srcDir("$projectDir/inputs")
}
}
repositories {
mavenCentral()
}
dependencies {
val aocktVersion = "0.2.1"
val kotestVersion = "5.9.1"
implementation("io.github.jadarma.aockt:aockt-core:$aocktVersion")
implementation("org.springframework.data:spring-data-commons:3.4.0")
testImplementation("io.github.jadarma.aockt:aockt-test:$aocktVersion")
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
}
tasks.test {
useJUnitPlatform()
testLogging {
events = setOf(FAILED, SKIPPED)
exceptionFormat = FULL
showStandardStreams = true
showCauses = true
showExceptions = true
showStackTraces = false
// Prints a summary at the end.
afterSuite(KotlinClosure2({ desc: TestDescriptor, result: TestResult ->
if (desc.parent != null) return@KotlinClosure2
with(result) {
println(
"\nResults: $resultType (" +
"$testCount tests, " +
"$successfulTestCount passed, " +
"$failedTestCount failed, " +
"$skippedTestCount skipped" +
")"
)
}
}))
}
}