-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
106 lines (97 loc) · 3.68 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import org.jetbrains.kotlin.daemon.common.trimQuotes
val konfigVersion = "1.6.10.0"
val ktorVersion = "3.0.1"
val logstashVersion = "8.0"
val logbackVersion = "1.5.12"
val nimbusJoseJwtVersion = "9.46"
val opentelemetryVersion = "1.44.1"
val opentelemetryKtorVersion = "2.10.0-alpha"
plugins {
application
kotlin("jvm") version "2.0.21"
id("org.jmailen.kotlinter") version "4.4.1"
id("com.github.ben-manes.versions") version "0.51.0"
id("com.gradleup.shadow") version "8.3.5" apply false
}
allprojects {
group = "io.nais"
version = "1.0.0"
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "application")
apply(plugin = "kotlin")
apply(plugin = "org.jmailen.kotlinter")
apply(plugin = "com.gradleup.shadow")
application {
mainClass.set("io.nais.WonderwalledKt")
}
tasks {
kotlin {
jvmToolchain(21)
}
jar {
manifest {
attributes["Main-Class"] = "io.nais.WonderwalledKt"
}
}
lintKotlin {
dependsOn("formatKotlin")
}
withType<JavaExec>().named("run") {
environment = file("$rootDir/.env")
.takeIf { it.exists() }
?.readLines()
?.filterNot { it.isEmpty() || it.startsWith("#") }
?.associate {
val (key, value) = it.split("=")
key to value.trimQuotes()
} ?: emptyMap()
}
}
dependencies {
implementation(kotlin("stdlib"))
implementation("io.ktor:ktor-server:${ktorVersion}")
implementation("io.ktor:ktor-server-cio:${ktorVersion}")
implementation("io.ktor:ktor-server-auth-jwt:${ktorVersion}")
implementation("io.ktor:ktor-server-content-negotiation:${ktorVersion}")
implementation("io.ktor:ktor-serialization-jackson:${ktorVersion}")
constraints {
// require a newer patch version to fix JsonAnySetter:
// https://github.com/FasterXML/jackson-databind/issues/4508
add("implementation", "com.fasterxml.jackson.core:jackson-annotations") {
version {
require("2.18.1")
}
}
add("implementation", "com.fasterxml.jackson.core:jackson-core") {
version {
require("2.18.1")
}
}
add("implementation", "com.fasterxml.jackson.core:jackson-databind") {
version {
require("2.18.1")
}
}
add("implementation", "com.fasterxml.jackson.module:jackson-module-kotlin") {
version {
require("2.18.1")
}
}
}
implementation("io.ktor:ktor-client-cio:${ktorVersion}")
implementation("io.ktor:ktor-client-core:${ktorVersion}")
implementation("io.ktor:ktor-client-content-negotiation:${ktorVersion}")
implementation("com.natpryce:konfig:${konfigVersion}")
implementation("com.nimbusds:nimbus-jose-jwt:${nimbusJoseJwtVersion}")
implementation("io.opentelemetry.instrumentation:opentelemetry-ktor-3.0:${opentelemetryKtorVersion}")
implementation("io.opentelemetry:opentelemetry-sdk:${opentelemetryVersion}")
implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:$opentelemetryVersion");
implementation("io.opentelemetry:opentelemetry-exporter-otlp:${opentelemetryVersion}")
implementation("net.logstash.logback:logstash-logback-encoder:${logstashVersion}")
runtimeOnly("ch.qos.logback:logback-classic:${logbackVersion}")
}
}