Skip to content

Commit

Permalink
IS-2335: Fix versions, dependabot and postgres-embedded dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad committed May 21, 2024
1 parent c1acf66 commit 5b3c5ed
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 69 deletions.
12 changes: 9 additions & 3 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
time: "07:00"
open-pull-requests-limit: 10
interval: weekly
open-pull-requests-limit: 10
groups:
minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
127 changes: 62 additions & 65 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.apache.tools.ant.taskdefs.condition.Os

group = "no.nav.syfo"
version = "1.0-SNAPSHOT"

object Versions {
const val confluent = "7.5.1"
const val jacksonDataType = "2.16.1"
const val flyway = "9.22.3"
const val hikari = "5.1.0"
const val isdialogmoteSchema = "1.0.5"
const val json = "20231013"
const val jetty = "9.4.53.v20231009"
const val kafka = "3.6.1"
const val kafkaEmbedded = "3.2.3"
const val kluent = "1.73"
const val ktor = "2.3.8"
const val logback = "1.4.14"
const val logstashEncoder = "7.4"
const val micrometerRegistry = "1.12.2"
const val mockk = "1.13.9"
const val nimbusjosejwt = "9.37.3"
const val postgres = "42.7.2"
val postgresEmbedded = if (Os.isFamily(Os.FAMILY_MAC)) "1.0.0" else "0.13.4"
const val spek = "2.0.19"
}
val confluentVersion = "7.5.1"
val jacksonDataTypeVersion = "2.16.1"
val flywayVersion = "9.22.3"
val hikariVersion = "5.1.0"
val isdialogmoteSchemaVersion = "1.0.5"
val jsonVersion = "20231013"
val jettyVersion = "9.4.53.v20231009"
val kafkaVersion = "3.6.1"
val kafkaEmbeddedVersion = "3.2.3"
val kluentVersion = "1.73"
val ktorVersion = "2.3.8"
val logbackVersion = "1.4.14"
val logstashEncoderVersion = "7.4"
val micrometerRegistryVersion = "1.12.2"
val mockkVersion = "1.13.9"
val nimbusjosejwtVersion = "9.37.3"
val postgresVersion = "42.7.2"
val postgresEmbeddedVersion = "2.0.7"
val spekVersion = "2.0.19"

plugins {
kotlin("jvm") version "1.9.23"
Expand Down Expand Up @@ -52,43 +49,43 @@ dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect"))

implementation("io.ktor:ktor-server-auth-jwt:${Versions.ktor}")
implementation("io.ktor:ktor-server-content-negotiation:${Versions.ktor}")
implementation("io.ktor:ktor-server-call-id:${Versions.ktor}")
implementation("io.ktor:ktor-server-status-pages:${Versions.ktor}")
implementation("io.ktor:ktor-server-netty:${Versions.ktor}")
implementation("io.ktor:ktor-client-apache:${Versions.ktor}")
implementation("io.ktor:ktor-client-cio:${Versions.ktor}")
implementation("io.ktor:ktor-client-content-negotiation:${Versions.ktor}")
implementation("io.ktor:ktor-serialization-jackson:${Versions.ktor}")
implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-server-call-id:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-client-apache:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")

// Logging
implementation("ch.qos.logback:logback-classic:${Versions.logback}")
implementation("net.logstash.logback:logstash-logback-encoder:${Versions.logstashEncoder}")
implementation("org.json:json:${Versions.json}")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
implementation("org.json:json:$jsonVersion")

// Metrics and Prometheus
implementation("io.ktor:ktor-server-metrics-micrometer:${Versions.ktor}")
implementation("io.micrometer:micrometer-registry-prometheus:${Versions.micrometerRegistry}")
implementation("io.ktor:ktor-server-metrics-micrometer:$ktorVersion")
implementation("io.micrometer:micrometer-registry-prometheus:$micrometerRegistryVersion")

// (De-)serialization
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${Versions.jacksonDataType}")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonDataTypeVersion")

// Database
implementation("org.postgresql:postgresql:${Versions.postgres}")
implementation("org.flywaydb:flyway-core:${Versions.flyway}")
implementation("com.zaxxer:HikariCP:${Versions.hikari}")
testImplementation("com.opentable.components:otj-pg-embedded:${Versions.postgresEmbedded}")
implementation("org.postgresql:postgresql:$postgresVersion")
implementation("org.flywaydb:flyway-core:$flywayVersion")
implementation("com.zaxxer:HikariCP:$hikariVersion")
testImplementation("io.zonky.test:embedded-postgres:$postgresEmbeddedVersion")

val excludeLog4j = fun ExternalModuleDependency.() {
exclude(group = "log4j")
}
// Kafka
implementation("org.apache.kafka:kafka_2.13:${Versions.kafka}", excludeLog4j)
implementation("io.confluent:kafka-avro-serializer:${Versions.confluent}")
implementation("org.apache.kafka:kafka_2.13:$kafkaVersion", excludeLog4j)
implementation("io.confluent:kafka-avro-serializer:$confluentVersion")
constraints {
implementation("org.apache.avro:avro") {
because("io.confluent:kafka-avro-serializer:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-39410")
because("io.confluent:kafka-avro-serializer:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-39410")
version {
require("1.11.3")
}
Expand All @@ -106,57 +103,57 @@ dependencies {
}
}
}
implementation("io.confluent:kafka-schema-registry:${Versions.confluent}", excludeLog4j)
implementation("io.confluent:kafka-schema-registry:$confluentVersion", excludeLog4j)
constraints {
implementation("org.apache.zookeeper:zookeeper") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-44981")
because("io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-44981")
version {
require("3.7.2")
}
}
implementation("com.google.protobuf:protobuf-java") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2021-22569")
because("io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2021-22569")
version {
require("3.25.1")
}
}
implementation("org.eclipse.jetty:jetty-server") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
because("io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
version {
require(Versions.jetty)
require(jettyVersion)
}
}
implementation("org.eclipse.jetty:jetty-xml") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
because("io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
version {
require(Versions.jetty)
require(jettyVersion)
}
}
implementation("org.eclipse.jetty:jetty-servlets") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
because("io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
version {
require(Versions.jetty)
require(jettyVersion)
}
}
implementation("org.eclipse.jetty.http2:http2-server") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
because("io.confluent:kafka-schema-registry:$confluentVersion -> https://www.cve.org/CVERecord?id=CVE-2023-36478")
version {
require(Versions.jetty)
require(jettyVersion)
}
}
}
implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:${Versions.isdialogmoteSchema}")
testImplementation("no.nav:kafka-embedded-env:${Versions.kafkaEmbedded}", excludeLog4j)

testImplementation("com.nimbusds:nimbus-jose-jwt:${Versions.nimbusjosejwt}")
testImplementation("io.ktor:ktor-server-test-host:${Versions.ktor}")
testImplementation("io.ktor:ktor-client-mock:${Versions.ktor}")
testImplementation("io.mockk:mockk:${Versions.mockk}")
testImplementation("org.amshove.kluent:kluent:${Versions.kluent}")
testImplementation("org.spekframework.spek2:spek-dsl-jvm:${Versions.spek}") {
implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:$isdialogmoteSchemaVersion")
testImplementation("no.nav:kafka-embedded-env:$kafkaEmbeddedVersion", excludeLog4j)

testImplementation("com.nimbusds:nimbus-jose-jwt:$nimbusjosejwtVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
testImplementation("io.ktor:ktor-client-mock:$ktorVersion")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("org.amshove.kluent:kluent:$kluentVersion")
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion") {
exclude(group = "org.jetbrains.kotlin")
}
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:${Versions.spek}") {
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion") {
exclude(group = "org.jetbrains.kotlin")
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/no/nav/syfo/testutil/TestDB.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package no.nav.syfo.testutil

import com.opentable.db.postgres.embedded.EmbeddedPostgres
import io.zonky.test.db.postgres.embedded.EmbeddedPostgres
import no.nav.syfo.database.DatabaseInterface
import no.nav.syfo.database.toList
import no.nav.syfo.dialogmotestatusendring.domain.PDialogmoteStatusendring
Expand Down

0 comments on commit 5b3c5ed

Please sign in to comment.