1
1
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2
2
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
3
- import org.apache.tools.ant.taskdefs.condition.Os
4
3
5
4
group = " no.nav.syfo"
6
5
version = " 1.0.0"
7
6
8
- object Versions {
9
- const val altinnCorrespondenceAgencyExternalVersion = " 1.2020.01.20-15.44-063ae9f84815"
10
- const val cxfVersion = " 3.5.7"
11
- const val confluent = " 7.5.1"
12
- const val flyway = " 9.22.3"
13
- const val hikari = " 5.0.1"
14
- const val isdialogmoteSchema = " 1.0.5"
15
- const val jacksonDataType = " 2.16.0"
16
- const val jedis = " 5.1.0"
17
- const val kafka = " 3.6.0"
18
- const val kafkaEmbedded = " 3.2.3"
19
- const val ktor = " 2.3.8"
20
- const val kluent = " 1.73"
21
- const val jaxbApi = " 2.3.1"
22
- const val jaxbRuntime = " 2.3.6"
23
- const val jaxsWsApiVersion = " 2.3.1"
24
- const val jaxwsToolsVersion = " 2.3.5"
25
- const val jetty = " 9.4.53.v20231009"
26
- const val logback = " 1.4.14"
27
- const val logstashEncoder = " 7.4"
28
- const val micrometerRegistry = " 1.12.0"
29
- const val mockk = " 1.13.8"
30
- const val nimbusjosejwt = " 9.37.2"
31
- val postgresEmbedded = if (Os .isFamily(Os .FAMILY_MAC )) " 1.0.0" else " 0.13.4"
32
- const val postgres = " 42.7.2"
33
- const val redisEmbedded = " 0.7.3"
34
- const val spek = " 2.0.19"
35
- const val tjenesteSpesifikasjonerGithub = " 1.2020.06.11-19.53-1cad83414166"
36
- }
7
+ val altinnCorrespondenceAgencyExternalVersion = " 1.2020.01.20-15.44-063ae9f84815"
8
+ val cxfVersion = " 3.5.7"
9
+ val confluentVersion = " 7.5.1"
10
+ val flywayVersion = " 9.22.3"
11
+ val hikariVersion = " 5.0.1"
12
+ val isdialogmoteSchemaVersion = " 1.0.5"
13
+ val jacksonDataTypeVersion = " 2.16.0"
14
+ val jedisVersion = " 5.1.0"
15
+ val kafkaVersion = " 3.6.0"
16
+ val kafkaEmbeddedVersion = " 3.2.3"
17
+ val ktorVersion = " 2.3.8"
18
+ val kluentVersion = " 1.73"
19
+ val jaxbApiVersion = " 2.3.1"
20
+ val jaxbRuntimeVersion = " 2.3.6"
21
+ val jaxsWsApiVersion = " 2.3.1"
22
+ val jaxwsToolsVersion = " 2.3.5"
23
+ val jettyVersion = " 9.4.53.v20231009"
24
+ val logbackVersion = " 1.4.14"
25
+ val logstashEncoderVersion = " 7.4"
26
+ val micrometerRegistryVersion = " 1.12.0"
27
+ val mockkVersion = " 1.13.8"
28
+ val nimbusjosejwtVersion = " 9.37.2"
29
+ val postgresEmbeddedVersion = " 2.0.7"
30
+ val postgresVersion = " 42.7.2"
31
+ val redisEmbeddedVersion = " 0.7.3"
32
+ val spekVersion = " 2.0.19"
33
+ val tjenesteSpesifikasjonerGithubVersion = " 1.2020.06.11-19.53-1cad83414166"
37
34
38
35
plugins {
39
36
kotlin(" jvm" ) version " 1.9.22"
@@ -67,48 +64,48 @@ dependencies {
67
64
implementation(kotlin(" stdlib" ))
68
65
implementation(kotlin(" reflect" ))
69
66
70
- implementation(" io.ktor:ktor-client-apache:${ Versions .ktor} " )
71
- implementation(" io.ktor:ktor-client-cio:${ Versions .ktor} " )
72
- implementation(" io.ktor:ktor-client-content-negotiation:${ Versions .ktor} " )
73
- implementation(" io.ktor:ktor-serialization-jackson:${ Versions .ktor} " )
74
- implementation(" io.ktor:ktor-server-auth-jwt:${ Versions .ktor} " )
75
- implementation(" io.ktor:ktor-server-call-id:${ Versions .ktor} " )
76
- implementation(" io.ktor:ktor-server-content-negotiation:${ Versions .ktor} " )
77
- implementation(" io.ktor:ktor-server-netty:${ Versions .ktor} " )
78
- implementation(" io.ktor:ktor-server-status-pages:${ Versions .ktor} " )
67
+ implementation(" io.ktor:ktor-client-apache:$ktorVersion " )
68
+ implementation(" io.ktor:ktor-client-cio:$ktorVersion " )
69
+ implementation(" io.ktor:ktor-client-content-negotiation:$ktorVersion " )
70
+ implementation(" io.ktor:ktor-serialization-jackson:$ktorVersion " )
71
+ implementation(" io.ktor:ktor-server-auth-jwt:$ktorVersion " )
72
+ implementation(" io.ktor:ktor-server-call-id:$ktorVersion " )
73
+ implementation(" io.ktor:ktor-server-content-negotiation:$ktorVersion " )
74
+ implementation(" io.ktor:ktor-server-netty:$ktorVersion " )
75
+ implementation(" io.ktor:ktor-server-status-pages:$ktorVersion " )
79
76
80
77
// JWT
81
- implementation(" com.nimbusds:nimbus-jose-jwt:${ Versions .nimbusjosejwt} " )
78
+ implementation(" com.nimbusds:nimbus-jose-jwt:$nimbusjosejwtVersion " )
82
79
83
80
// Logging
84
- implementation(" ch.qos.logback:logback-classic:${ Versions .logback} " )
85
- implementation(" net.logstash.logback:logstash-logback-encoder:${ Versions .logstashEncoder} " )
81
+ implementation(" ch.qos.logback:logback-classic:$logbackVersion " )
82
+ implementation(" net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion " )
86
83
87
84
// Metrics and Prometheus
88
- implementation(" io.ktor:ktor-server-metrics-micrometer:${ Versions .ktor} " )
89
- implementation(" io.micrometer:micrometer-registry-prometheus:${ Versions .micrometerRegistry} " )
85
+ implementation(" io.ktor:ktor-server-metrics-micrometer:$ktorVersion " )
86
+ implementation(" io.micrometer:micrometer-registry-prometheus:$micrometerRegistryVersion " )
90
87
91
88
// (De-)serialization
92
- implementation(" com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${ Versions .jacksonDataType} " )
93
- implementation(" javax.xml.bind:jaxb-api:${ Versions .jaxbApi} " )
94
- implementation(" org.glassfish.jaxb:jaxb-runtime:${ Versions .jaxbRuntime} " )
89
+ implementation(" com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonDataTypeVersion " )
90
+ implementation(" javax.xml.bind:jaxb-api:$jaxbApiVersion " )
91
+ implementation(" org.glassfish.jaxb:jaxb-runtime:$jaxbRuntimeVersion " )
95
92
96
93
// Cache
97
- implementation(" redis.clients:jedis:${ Versions .jedis} " )
98
- testImplementation(" it.ozimov:embedded-redis:${ Versions .redisEmbedded} " )
94
+ implementation(" redis.clients:jedis:$jedisVersion " )
95
+ testImplementation(" it.ozimov:embedded-redis:$redisEmbeddedVersion " )
99
96
100
97
// Database
101
- implementation(" org.postgresql:postgresql:${ Versions .postgres} " )
102
- implementation(" com.zaxxer:HikariCP:${ Versions .hikari} " )
103
- implementation(" org.flywaydb:flyway-core:${ Versions .flyway} " )
104
- testImplementation(" com.opentable.components:otj-pg- embedded: ${ Versions .postgresEmbedded} " )
98
+ implementation(" org.postgresql:postgresql:$postgresVersion " )
99
+ implementation(" com.zaxxer:HikariCP:$hikariVersion " )
100
+ implementation(" org.flywaydb:flyway-core:$flywayVersion " )
101
+ testImplementation(" io.zonky.test: embedded-postgres: $postgresEmbeddedVersion " )
105
102
106
103
// Kafka
107
104
val excludeLog4j = fun ExternalModuleDependency .() {
108
105
exclude(group = " log4j" )
109
106
}
110
- implementation(" org.apache.kafka:kafka_2.13:${ Versions .kafka} " , excludeLog4j)
111
- implementation(" io.confluent:kafka-avro-serializer:${ Versions .confluent} " , excludeLog4j)
107
+ implementation(" org.apache.kafka:kafka_2.13:$kafkaVersion " , excludeLog4j)
108
+ implementation(" io.confluent:kafka-avro-serializer:$confluentVersion " , excludeLog4j)
112
109
constraints {
113
110
implementation(" org.apache.commons:commons-compress" ) {
114
111
because(" org.apache.commons:commons-compress:1.22 -> https://www.cve.org/CVERecord?id=CVE-2012-2098" )
@@ -123,96 +120,96 @@ dependencies {
123
120
}
124
121
}
125
122
}
126
- implementation(" io.confluent:kafka-schema-registry:${ Versions .confluent} " , excludeLog4j)
123
+ implementation(" io.confluent:kafka-schema-registry:$confluentVersion " , excludeLog4j)
127
124
constraints {
128
125
implementation(" org.yaml:snakeyaml" ) {
129
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://advisory.checkmarx.net/advisory/vulnerability/CVE-2022-25857/" )
126
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://advisory.checkmarx.net/advisory/vulnerability/CVE-2022-25857/" )
130
127
version {
131
128
require(" 1.31" )
132
129
}
133
130
}
134
131
implementation(" org.glassfish:jakarta.el" ) {
135
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://advisory.checkmarx.net/advisory/vulnerability/CVE-2021-28170/" )
132
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://advisory.checkmarx.net/advisory/vulnerability/CVE-2021-28170/" )
136
133
version {
137
134
require(" 3.0.4" )
138
135
}
139
136
}
140
137
implementation(" com.google.protobuf:protobuf-java" ) {
141
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://www.cve.org/CVERecord?id=CVE-2022-3510" )
138
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2022-3510" )
142
139
version {
143
140
require(" 3.25.1" )
144
141
}
145
142
}
146
143
implementation(" org.apache.zookeeper:zookeeper" ) {
147
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-44981" )
144
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-44981" )
148
145
version {
149
146
require(" 3.7.2" )
150
147
}
151
148
}
152
149
implementation(" org.eclipse.jetty:jetty-server" ) {
153
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
150
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
154
151
version {
155
- require(Versions .jetty )
152
+ require(jettyVersion )
156
153
}
157
154
}
158
155
implementation(" org.eclipse.jetty:jetty-xml" ) {
159
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
156
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
160
157
version {
161
- require(Versions .jetty )
158
+ require(jettyVersion )
162
159
}
163
160
}
164
161
implementation(" org.eclipse.jetty:jetty-servlets" ) {
165
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
162
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
166
163
version {
167
- require(Versions .jetty )
164
+ require(jettyVersion )
168
165
}
169
166
}
170
167
implementation(" org.eclipse.jetty.http2:http2-server" ) {
171
- because(" io.confluent:kafka-schema-registry:${ Versions .confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
168
+ because(" io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478" )
172
169
version {
173
- require(Versions .jetty )
170
+ require(jettyVersion )
174
171
}
175
172
}
176
173
}
177
- implementation(" no.nav.syfo.dialogmote.avro:isdialogmote-schema:${ Versions .isdialogmoteSchema} " )
174
+ implementation(" no.nav.syfo.dialogmote.avro:isdialogmote-schema:$isdialogmoteSchemaVersion " )
178
175
constraints {
179
176
implementation(" org.apache.avro:avro" ) {
180
- because(" no.nav.syfo.dialogmote.avro:isdialogmote-schema:${ Versions .isdialogmoteSchema} -> https://nvd.nist.gov/vuln/detail/CVE-2023-39410" )
177
+ because(" no.nav.syfo.dialogmote.avro:isdialogmote-schema:$isdialogmoteSchemaVersion -> https://nvd.nist.gov/vuln/detail/CVE-2023-39410" )
181
178
version {
182
179
require(" 1.11.3" )
183
180
}
184
181
}
185
182
}
186
- testImplementation(" no.nav:kafka-embedded-env:${ Versions .kafkaEmbedded} " , excludeLog4j)
183
+ testImplementation(" no.nav:kafka-embedded-env:$kafkaEmbeddedVersion " , excludeLog4j)
187
184
188
- implementation(" no.nav.tjenestespesifikasjoner:servicemeldingMedKontaktinformasjon-v1-tjenestespesifikasjon:${ Versions .tjenesteSpesifikasjonerGithub} " )
185
+ implementation(" no.nav.tjenestespesifikasjoner:servicemeldingMedKontaktinformasjon-v1-tjenestespesifikasjon:$tjenesteSpesifikasjonerGithubVersion " )
189
186
190
- testImplementation(" io.ktor:ktor-server-test-host:${ Versions .ktor} " )
191
- testImplementation(" io.mockk:mockk:${ Versions .mockk} " )
192
- testImplementation(" org.amshove.kluent:kluent:${ Versions .kluent} " )
193
- testImplementation(" org.spekframework.spek2:spek-dsl-jvm:${ Versions .spek} " ) {
187
+ testImplementation(" io.ktor:ktor-server-test-host:$ktorVersion " )
188
+ testImplementation(" io.mockk:mockk:$mockkVersion " )
189
+ testImplementation(" org.amshove.kluent:kluent:$kluentVersion " )
190
+ testImplementation(" org.spekframework.spek2:spek-dsl-jvm:$spekVersion " ) {
194
191
exclude(group = " org.jetbrains.kotlin" )
195
192
}
196
- testRuntimeOnly(" org.spekframework.spek2:spek-runner-junit5:${ Versions .spek} " ) {
193
+ testRuntimeOnly(" org.spekframework.spek2:spek-runner-junit5:$spekVersion " ) {
197
194
exclude(group = " org.jetbrains.kotlin" )
198
195
}
199
196
200
197
// Soap
201
- implementation(" no.nav.tjenestespesifikasjoner:altinn-correspondence-agency-external-basic:${ Versions . altinnCorrespondenceAgencyExternalVersion} " )
202
- implementation(" org.apache.cxf:cxf-rt-frontend-jaxws:${ Versions . cxfVersion} " )
203
- implementation(" org.apache.cxf:cxf-rt-features-logging:${ Versions . cxfVersion} " )
204
- implementation(" org.apache.cxf:cxf-rt-transports-http:${ Versions . cxfVersion} " )
205
- implementation(" org.apache.cxf:cxf-rt-ws-security:${ Versions . cxfVersion} " )
198
+ implementation(" no.nav.tjenestespesifikasjoner:altinn-correspondence-agency-external-basic:$altinnCorrespondenceAgencyExternalVersion " )
199
+ implementation(" org.apache.cxf:cxf-rt-frontend-jaxws:$cxfVersion " )
200
+ implementation(" org.apache.cxf:cxf-rt-features-logging:$cxfVersion " )
201
+ implementation(" org.apache.cxf:cxf-rt-transports-http:$cxfVersion " )
202
+ implementation(" org.apache.cxf:cxf-rt-ws-security:$cxfVersion " )
206
203
constraints {
207
204
implementation(" org.apache.santuario:xmlsec" ) {
208
- because(" org.apache.cxf:cxf-rt-ws-security:${ Versions . cxfVersion} -> https://nvd.nist.gov/vuln/detail/CVE-2023-44483" )
205
+ because(" org.apache.cxf:cxf-rt-ws-security:$cxfVersion -> https://nvd.nist.gov/vuln/detail/CVE-2023-44483" )
209
206
version {
210
207
require(" 2.3.4" )
211
208
}
212
209
}
213
210
}
214
- implementation(" javax.xml.ws:jaxws-api:${ Versions . jaxsWsApiVersion} " )
215
- implementation(" com.sun.xml.ws:jaxws-tools:${ Versions . jaxwsToolsVersion} " ) {
211
+ implementation(" javax.xml.ws:jaxws-api:$jaxsWsApiVersion " )
212
+ implementation(" com.sun.xml.ws:jaxws-tools:$jaxwsToolsVersion " ) {
216
213
exclude(group = " com.sun.xml.ws" , module = " policy" )
217
214
}
218
215
}
0 commit comments