-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
64 lines (51 loc) · 1.57 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
val ktorVersion = "3.0.3"
val logbackVersion = "1.5.16"
val logstashEncoderVersion = "8.0"
val junitJupiterVersion = "5.11.4"
val mainClassName = "no.nav.MainKt"
plugins {
kotlin("jvm") version "2.1.0"
}
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(21)
}
dependencies {
implementation(kotlin("stdlib"))
implementation("io.ktor:ktor-server-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
}
tasks {
withType<Jar> {
archiveBaseName.set("app")
manifest {
attributes["Main-Class"] = mainClassName
attributes["Class-Path"] = configurations.runtimeClasspath.get().joinToString(separator = " ") {
it.name
}
}
doLast {
configurations.runtimeClasspath.get().forEach {
val file = File("${layout.buildDirectory.get()}/libs/${it.name}")
if (!file.exists())
it.copyTo(file)
}
}
}
withType<Test> {
useJUnitPlatform()
testLogging {
showExceptions = true
}
}
withType<Wrapper> {
gradleVersion = "8.12"
}
}