-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
117 lines (92 loc) · 3.59 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
107
108
109
110
111
112
113
114
115
116
117
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "no.nav.syfo"
version = "1.0.0"
val javaVersion = JvmTarget.JVM_21
val coroutinesVersion = "1.9.0"
val jacksonVersion = "2.18.2"
val kafkaVersion = "3.9.0"
val ktorVersion = "3.0.2"
val logbackVersion = "1.5.12"
val logstashEncoderVersion = "8.0"
val prometheusVersion = "0.16.0"
val kotlinVersion = "2.1.0"
val junitJupiterVersion = "5.11.3"
val ktfmtVersion = "0.44"
///Due to vulnerabilities
val nettyCommonVersion = "4.1.115.Final"
plugins {
kotlin("jvm") version "2.1.0"
id("com.diffplug.spotless") version "6.25.0"
id("com.gradleup.shadow") version "8.3.5"
}
repositories {
mavenCentral()
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
constraints {
implementation("io.netty:netty-common:$nettyCommonVersion") {
because("override transient from io.ktor:ktor-server-netty")
}
}
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-server-call-id:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
implementation("com.fasterxml.jackson.module:jackson-module-jaxb-annotations:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("org.apache.kafka:kafka-streams:$kafkaVersion")
implementation("org.apache.kafka:kafka_2.12:$kafkaVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
}
kotlin {
compilerOptions {
jvmTarget = javaVersion
}
}
tasks {
withType<Jar> {
manifest.attributes["Main-Class"] = "no.nav.syfo.BootstrapKt"
}
create("printVersion") {
println(project.version)
}
withType<ShadowJar> {
transform(ServiceFileTransformer::class.java) {
setPath("META-INF/cxf")
include("bus-extensions.txt")
}
}
withType<Test> {
useJUnitPlatform {
}
testLogging {
events("skipped", "failed")
showStackTraces = true
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
spotless {
kotlin { ktfmt(ktfmtVersion).kotlinlangStyle() }
check {
dependsOn("spotlessApply")
}
}
}