generated from kotlin-hands-on/advent-of-code-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
46 lines (37 loc) · 1.14 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
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.1.0"
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.11.3")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.3")
testImplementation("org.assertj:assertj-core:3.26.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks {
wrapper {
gradleVersion = "8.11.1"
}
test {
useJUnitPlatform()
afterTest(KotlinClosure2<TestDescriptor, TestResult, Any>({ descriptor, result ->
val test = descriptor as org.gradle.api.internal.tasks.testing.TestDescriptorInternal
println("${test.className} > ${test.name} [${test.displayName}]: ${result.resultType}")
}))
}
}
tasks.withType<KotlinCompile> {
compilerOptions {
languageVersion.set(KotlinVersion.KOTLIN_2_1)
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}