-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
83 lines (72 loc) · 2.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import com.diffplug.spotless.LineEnding
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
application
kotlin("jvm") version "2.1.20"
id(Spotless.spotless) version "6.11.0"
}
repositories {
mavenCentral()
maven("https://packages.confluent.io/maven/")
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
}
allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = Spotless.spotless)
dependencies {
implementation(kotlin("reflect"))
testRuntimeOnly(Junit5.engine)
testImplementation(Junit5.api)
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
spotless {
kotlin {
ktlint(Ktlint.version)
}
kotlinGradle {
target("*.gradle.kts", "buildSrc/**/*.kt*")
ktlint(Ktlint.version)
}
// Workaround for <https://github.com/diffplug/spotless/issues/1644>
// using idea found at
// <https://github.com/diffplug/spotless/issues/1527#issuecomment-1409142798>.
lineEndings = LineEnding.PLATFORM_NATIVE // or any other except GIT_ATTRIBUTES
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
reports {
junitXml.isOutputPerTestCase = true
}
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
repositories {
mavenCentral()
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
}
tasks.named("compileKotlin") {
dependsOn("spotlessApply")
}
dependencies {
testImplementation(kotlin("test"))
testImplementation(Junit5.api)
testRuntimeOnly(Junit5.engine)
}
}