Skip to content

Commit 08520f1

Browse files
IS-2335: Fix versions, dependabot and postgres-embedded dependency (#512)
1 parent 437a8ad commit 08520f1

File tree

3 files changed

+92
-89
lines changed

3 files changed

+92
-89
lines changed

.github/dependabot.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ updates:
1010
- package-ecosystem: gradle
1111
directory: "/"
1212
schedule:
13-
interval: daily
14-
time: "07:00"
15-
open-pull-requests-limit: 10
13+
interval: weekly
14+
open-pull-requests-limit: 10
15+
groups:
16+
minor-and-patch:
17+
patterns:
18+
- "*"
19+
update-types:
20+
- "minor"
21+
- "patch"

build.gradle.kts

+82-85
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
3-
import org.apache.tools.ant.taskdefs.condition.Os
43

54
group = "no.nav.syfo"
65
version = "1.0.0"
76

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"
3734

3835
plugins {
3936
kotlin("jvm") version "1.9.22"
@@ -67,48 +64,48 @@ dependencies {
6764
implementation(kotlin("stdlib"))
6865
implementation(kotlin("reflect"))
6966

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")
7976

8077
// JWT
81-
implementation("com.nimbusds:nimbus-jose-jwt:${Versions.nimbusjosejwt}")
78+
implementation("com.nimbusds:nimbus-jose-jwt:$nimbusjosejwtVersion")
8279

8380
// 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")
8683

8784
// 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")
9087

9188
// (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")
9592

9693
// 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")
9996

10097
// 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")
105102

106103
// Kafka
107104
val excludeLog4j = fun ExternalModuleDependency.() {
108105
exclude(group = "log4j")
109106
}
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)
112109
constraints {
113110
implementation("org.apache.commons:commons-compress") {
114111
because("org.apache.commons:commons-compress:1.22 -> https://www.cve.org/CVERecord?id=CVE-2012-2098")
@@ -123,96 +120,96 @@ dependencies {
123120
}
124121
}
125122
}
126-
implementation("io.confluent:kafka-schema-registry:${Versions.confluent}", excludeLog4j)
123+
implementation("io.confluent:kafka-schema-registry:$confluentVersion", excludeLog4j)
127124
constraints {
128125
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/")
130127
version {
131128
require("1.31")
132129
}
133130
}
134131
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/")
136133
version {
137134
require("3.0.4")
138135
}
139136
}
140137
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")
142139
version {
143140
require("3.25.1")
144141
}
145142
}
146143
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")
148145
version {
149146
require("3.7.2")
150147
}
151148
}
152149
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")
154151
version {
155-
require(Versions.jetty)
152+
require(jettyVersion)
156153
}
157154
}
158155
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")
160157
version {
161-
require(Versions.jetty)
158+
require(jettyVersion)
162159
}
163160
}
164161
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")
166163
version {
167-
require(Versions.jetty)
164+
require(jettyVersion)
168165
}
169166
}
170167
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")
172169
version {
173-
require(Versions.jetty)
170+
require(jettyVersion)
174171
}
175172
}
176173
}
177-
implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:${Versions.isdialogmoteSchema}")
174+
implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:$isdialogmoteSchemaVersion")
178175
constraints {
179176
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")
181178
version {
182179
require("1.11.3")
183180
}
184181
}
185182
}
186-
testImplementation("no.nav:kafka-embedded-env:${Versions.kafkaEmbedded}", excludeLog4j)
183+
testImplementation("no.nav:kafka-embedded-env:$kafkaEmbeddedVersion", excludeLog4j)
187184

188-
implementation("no.nav.tjenestespesifikasjoner:servicemeldingMedKontaktinformasjon-v1-tjenestespesifikasjon:${Versions.tjenesteSpesifikasjonerGithub}")
185+
implementation("no.nav.tjenestespesifikasjoner:servicemeldingMedKontaktinformasjon-v1-tjenestespesifikasjon:$tjenesteSpesifikasjonerGithubVersion")
189186

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") {
194191
exclude(group = "org.jetbrains.kotlin")
195192
}
196-
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:${Versions.spek}") {
193+
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion") {
197194
exclude(group = "org.jetbrains.kotlin")
198195
}
199196

200197
// 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")
206203
constraints {
207204
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")
209206
version {
210207
require("2.3.4")
211208
}
212209
}
213210
}
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") {
216213
exclude(group = "com.sun.xml.ws", module = "policy")
217214
}
218215
}

src/test/kotlin/no/nav/syfo/testhelper/TestDatabase.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package no.nav.syfo.testhelper
22

3-
import com.opentable.db.postgres.embedded.EmbeddedPostgres
3+
import io.zonky.test.db.postgres.embedded.EmbeddedPostgres
44
import no.nav.syfo.application.database.DatabaseInterface
55
import no.nav.syfo.application.database.toList
66
import no.nav.syfo.dialogmote.database.*

0 commit comments

Comments
 (0)