-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
76 lines (67 loc) · 2.15 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
import com.diffplug.spotless.LineEnding
plugins {
kotlin("jvm") version "1.9.23"
application
id("com.diffplug.spotless") version "6.25.0"
}
kotlin {
jvmToolchain(21)
}
application {
mainClass.set("no.nav.dagpenger.behovsakkumulator.AppKt")
group = "no.nav.dagpenger"
version = "1.0"
}
repositories {
mavenCentral()
maven("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
maven("https://packages.confluent.io/maven/")
}
dependencies {
implementation("com.github.navikt:rapids-and-rivers:2024112510241732526640.8542991368ca")
implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("com.github.navikt.tbd-libs:rapids-and-rivers-test:2024.12.18-11.39-73f8eecb")
implementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.4")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.9.1")
testImplementation("io.mockk:mockk:1.13.16")
}
tasks {
build {
dependsOn("spotlessApply")
}
jar {
manifest {
attributes["Main-Class"] = application.mainClass
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveFileName.set("${project.name}-fat.jar")
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
}
test {
useJUnitPlatform()
testLogging {
showExceptions = true
showStackTraces = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
events =
setOf(
org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED,
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
)
showStandardStreams = true
}
}
}
spotless {
kotlin {
ktlint()
}
kotlinGradle {
target("*.gradle.kts")
ktlint()
}
// https://github.com/diffplug/spotless/issues/1644
lineEndings = LineEnding.PLATFORM_NATIVE // or any other except GIT_ATTRIBUTES
}