generated from Jadarma/advent-of-code-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
62 lines (54 loc) · 1.63 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
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 "1.9.20"
}
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.1.0"
val kotestVersion = "5.5.5"
implementation("io.github.jadarma.aockt:aockt-core:$aocktVersion")
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" +
")"
)
}
}))
}
}