-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
74 lines (59 loc) · 1.71 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
import org.gradle.api.file.DuplicatesStrategy.EXCLUDE
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType.HTML
plugins {
application
jacoco
kotlin("jvm") version "2.1.0"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id("com.adarshr.test-logger") version "4.0.0"
}
application {
mainClass.set("adventofcode.MainKt")
}
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("reflect"))
implementation("com.diogonunes:JColor:5.5.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.1")
implementation("org.reflections:reflections:0.10.2")
implementation("org.slf4j:slf4j-nop:2.0.16")
testImplementation("io.kotest:kotest-runner-junit5-jvm:5.9.1")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.9.1")
}
ktlint {
reporters {
reporter(HTML)
}
}
testlogger {
// 15 seconds, see adventofcode.util.ConsoleFormatterKt.formatBenchmark
slowThreshold = 15_000
}
tasks {
withType<Wrapper> {
gradleVersion = "8.11.1"
}
withType<KotlinCompile> {
kotlin {
jvmToolchain(JavaVersion.VERSION_21.toString().toInt())
}
}
withType<Test> {
useJUnitPlatform()
finalizedBy("jacocoTestReport")
}
withType<JacocoReport> {
reports {
xml.required.set(true)
}
}
withType<Jar> {
manifest.attributes["Main-Class"] = application.mainClass
// Include runtime dependencies (create a fat jar)
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
duplicatesStrategy = EXCLUDE
}
}