-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
116 lines (97 loc) · 4.23 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
group = "no.nav.syfo"
version = "1.0-SNAPSHOT"
val coroutinesVersion = "1.8.1"
val kotlinSerializationVersion = "0.20.0"
val ktorVersion = "2.3.2"
val logbackVersion = "1.5.16"
val logstashEncoderVersion = "7.4"
val prometheusVersion = "0.16.0"
val jacksonVersion = "2.18.2"
val mockkVersion = "1.13.16"
val kotestVersion = "5.9.1"
val kotestExtensionsVersion = "2.0.0"
val kotlinVersion = "2.1.0"
val javaJwtVersion = "4.4.0"
val nimbusVersion = "9.48"
val detektVersion = "1.23.1"
tasks.withType<Jar> {
manifest.attributes["Main-Class"] = "no.nav.syfo.MainApplicationKt"
}
plugins {
kotlin("jvm") version "2.0.21"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("io.gitlab.arturbosch.detekt") version "1.23.7"
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlinSerializationVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlinSerializationVersion")
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
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("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-apache:$ktorVersion")
implementation("io.ktor:ktor-client-logging:$ktorVersion")
implementation("io.ktor:ktor-client-logging-jvm:$ktorVersion")
implementation("io.ktor:ktor-client-jackson:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
// Auth
implementation("io.ktor:ktor-server-auth:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion")
implementation("com.auth0:java-jwt:$javaJwtVersion")
implementation("com.nimbusds:nimbus-jose-jwt:$nimbusVersion")
// Testing
testImplementation(kotlin("test"))
testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlinVersion")
testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-property:$kotestVersion")
testImplementation("io.kotest.extensions:kotest-assertions-ktor:$kotestExtensionsVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
api("io.ktor:ktor-client-mock:$ktorVersion")
api("io.ktor:ktor-client-mock-jvm:$ktorVersion")
constraints {
implementation("io.netty:netty-codec:4.1.117.Final")
}
}
detekt {
toolVersion = detektVersion
config.setFrom(file("config/detekt/detekt.yml"))
buildUponDefaultConfig = true
}
java.toolchain {
languageVersion.set(JavaLanguageVersion.of(19))
vendor.set(JvmVendorSpec.ADOPTIUM)
}
tasks {
create("printVersion") {
println(project.version)
}
withType<ShadowJar> {
transform(ServiceFileTransformer::class.java) {
setPath("META-INF/cxf")
include("bus-extensions.txt")
}
}
withType<Test> {
useJUnitPlatform()
}
}