-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
223 lines (199 loc) · 9.7 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val ktorVersion = "2.1.3"
val kafkaVersion = "3.3.1"
val jacksonVersion = "2.14.1"
val prometheusVersion = "0.16.0"
val logbackVersion = "1.4.5"
val logstashVersion = "7.2"
val konfigVersion = "1.6.10.0"
val kotlinLoggerVersion = "1.8.3"
val tjenestespesifikasjonerVersion = "1.2019.12.18-12.22-ce897c4eb2c1"
val coroutinesVersion = "1.5.2"
val wireMockVersion = "2.35.0"
val mockkVersion = "1.10.5"
val junitJupiterVersion = "5.7.0"
val assertkVersion = "0.23"
val restAssuredVersion = "4.3.3"
val resilience4jVersion = "1.5.0"
val threetenVersion = "1.5.0"
val kotlinReflectVersion = "1.7.21"
val cucumberVersion = "7.17.0"
val nocommonsVersion = "0.9.0"
val graphqlKotlinClientVersion = "5.3.1"
val archUnitVersion = "0.14.1"
val jsonassertVersion = "1.5.3"
val xmlSchemaVersion = "2.2.5"
val jaxwsToolsVersion = "2.3.1"
val activationVersion = "1.1.1"
val nvi18nVersion = "1.27"
val kotestVersion = "4.2.5"
val swaggerRequestValidatorVersion = "2.33.1"
// Temporary to fix high severity Snyk vulnerabilities:
val nettyVersion = "4.1.68.Final"
val commonsCodecVersion = "3.2.2"
val httpClientVersion = "4.5.13"
val jettyWebAppVersion = "9.4.43.v20210629"
val jacksonDataformatYamlVersion = "2.10.4"
val guavaVersion = "30.0-jre"
val mainClass = "no.nav.medlemskap.ApplicationKt"
fun tjenestespesifikasjon(name: String) = "no.nav.tjenestespesifikasjoner:$name:$tjenestespesifikasjonerVersion"
plugins {
kotlin("jvm") version "1.9.20"
id("com.github.johnrengelman.shadow") version "7.0.0"
id("com.expediagroup.graphql") version "4.0.0" apply false
id("com.github.ben-manes.versions") version "0.29.0"
id("org.jetbrains.kotlin.plugin.serialization") version "1.7.10"
}
val githubUser: String by project
val githubPassword: String by project
allprojects {
repositories {
gradlePluginPortal()
mavenCentral()
maven("https://jitpack.io")
maven("https://build.shibboleth.net/nexus/content/repositories/releases/")
maven {
url = uri("https://maven.pkg.github.com/navikt/tjenestespesifikasjoner")
credentials {
username = githubUser
password = githubPassword
}
content {
excludeGroup("com.expediagroup")
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "20"
}
tasks.withType<Wrapper> {
gradleVersion = "8.6"
}
}
dependencies {
implementation(kotlin("stdlib"))
implementation(project(path = ":pdl-client", configuration = "archives"))
implementation(project(path = ":saf-client", configuration = "archives"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion") {
exclude(group = "io.netty", module = "netty-codec")
exclude(group = "io.netty", module = "netty-codec-http")
}
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-server-call-logging-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-call-id-jvm:$ktorVersion")
implementation("com.expediagroup:graphql-kotlin-ktor-client:$graphqlKotlinClientVersion")
implementation("io.ktor:ktor-client-serialization-jvm:2.1.0")
implementation("com.fasterxml.jackson.core:jackson-annotations:2.13.1")
implementation("io.ktor:ktor-server-auth:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-apache:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-json:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-server-metrics-micrometer:$ktorVersion")
implementation("io.micrometer:micrometer-registry-prometheus:latest.release")
implementation("io.micrometer:micrometer-registry-influx:latest.release")
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashVersion")
implementation("com.natpryce:konfig:$konfigVersion")
implementation("io.github.microutils:kotlin-logging:$kotlinLoggerVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("io.ktor:ktor-server-auth-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jwt-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("org.threeten:threeten-extra:$threetenVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinReflectVersion")
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinReflectVersion")
implementation("javax.activation:activation:$activationVersion")
implementation("org.apache.ws.xmlschema:xmlschema-core:$xmlSchemaVersion")
implementation("com.sun.xml.ws:jaxws-tools:$jaxwsToolsVersion") {
exclude(group = "com.sun.xml.ws", module = "policy")
}
implementation("org.apache.kafka:kafka-clients:$kafkaVersion")
implementation(tjenestespesifikasjon("udi-personstatus-v1"))
implementation("io.github.resilience4j:resilience4j-retry:$resilience4jVersion")
implementation("io.github.resilience4j:resilience4j-kotlin:$resilience4jVersion")
implementation("no.bekk.bekkopen:nocommons:$nocommonsVersion")
implementation("com.expediagroup:graphql-kotlin-ktor-client:$graphqlKotlinClientVersion")
implementation("com.neovisionaries:nv-i18n:$nvi18nVersion")
implementation("commons-collections:commons-collections:$commonsCodecVersion")
implementation("org.apache.httpcomponents:httpclient:$httpClientVersion")
implementation("com.google.guava:guava:$guavaVersion")
testImplementation("org.eclipse.jetty:jetty-webapp:$jettyWebAppVersion")
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("com.github.tomakehurst:wiremock-jre8:$wireMockVersion") {
implementation("commons-fileupload:commons-fileupload:1.5")
exclude(group = "junit")
exclude(group = "org.eclipse.jetty", module = "jetty-server")
}
testImplementation("io.mockk:mockk:$mockkVersion")
// testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:$assertkVersion")
testImplementation("io.rest-assured:rest-assured:$restAssuredVersion")
testImplementation(platform("io.cucumber:cucumber-bom:7.11.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("io.cucumber:cucumber-junit-platform-engine")
testImplementation("org.junit.platform:junit-platform-suite")
testImplementation("io.cucumber:cucumber-junit:$cucumberVersion")
testImplementation("io.cucumber:cucumber-java8:$cucumberVersion")
testImplementation("com.tngtech.archunit:archunit:$archUnitVersion")
testImplementation("com.tngtech.archunit:archunit-junit5:$archUnitVersion")
testImplementation("org.skyscreamer:jsonassert:$jsonassertVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("com.atlassian.oai:swagger-request-validator-core:$swaggerRequestValidatorVersion") {
implementation("org.mozilla:rhino:1.7.14")
exclude(group = "com.fasterxml.jackson.dataformat", module = "jackson-dataformat-yaml")
}
testImplementation("com.atlassian.oai:swagger-request-validator-restassured:$swaggerRequestValidatorVersion")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
}
java {
sourceCompatibility = JavaVersion.VERSION_20
targetCompatibility = JavaVersion.VERSION_20
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "20"
}
withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
withType<ShadowJar> {
archiveBaseName.set("app")
archiveClassifier.set("")
manifest {
attributes(
mapOf(
"Main-Class" to mainClass
)
)
}
}
test {
useJUnitPlatform()
//Trengs inntil videre for bytebuddy med java 16, som brukes av mockk.
jvmArgs = listOf("-Dnet.bytebuddy.experimental=true")
java.targetCompatibility = JavaVersion.VERSION_20
java.sourceCompatibility = JavaVersion.VERSION_20
}
}