Skip to content

Commit

Permalink
Merge pull request #1773 from navikt/convert-more-libs-to-new-format
Browse files Browse the repository at this point in the history
Convert more libs to new format
  • Loading branch information
hestad authored Apr 22, 2024
2 parents 3d39c49 + 11d42eb commit b279540
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 43 deletions.
85 changes: 42 additions & 43 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,37 @@ subprojects {
maven("https://oss.sonatype.org/content/repositories/releases/")
maven("https://packages.confluent.io/maven/")
}
val kotestVersion = "5.8.1"
val jacksonVersion = "2.17.0"
val confluentVersion = "7.6.1"
dependencies {
implementation(rootProject.libs.kotlin.reflect)
implementation(rootProject.libs.kotlin.script.runtime)
implementation(rootProject.libs.kotlin.compiler.embeddable)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation(platform("io.arrow-kt:arrow-stack:1.2.4"))
implementation("io.arrow-kt:arrow-core")
implementation("io.arrow-kt:arrow-fx-coroutines")
implementation("io.arrow-kt:arrow-fx-stm")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
implementation(rootProject.libs.kotlinx.coroutines.core)
implementation(platform(rootProject.libs.arrow.stack))
implementation(rootProject.libs.arrow.core)
implementation(rootProject.libs.arrow.fx.coroutines)
implementation(rootProject.libs.arrow.fx.stm)
implementation(rootProject.libs.jackson.datatype.jsr310)
implementation(rootProject.libs.jackson.datatype.jdk8)
implementation(rootProject.libs.jackson.module.kotlin)
implementation(rootProject.libs.jackson.dataformat.xml)
implementation(rootProject.libs.slf4j.api)
implementation(rootProject.libs.jul.to.slf4j)
implementation(rootProject.libs.jcl.over.slf4j)
implementation(rootProject.libs.log4j.over.slf4j)
implementation("ch.qos.logback:logback-classic:1.5.6")
implementation("net.logstash.logback:logstash-logback-encoder:7.4")
implementation("com.papertrailapp", "logback-syslog4j", "1.0.0")
implementation("io.github.cdimascio:dotenv-kotlin:6.4.1")
implementation("com.networknt:json-schema-validator:1.4.0")
implementation("com.ibm.mq:com.ibm.mq.allclient:9.3.5.0")
implementation("org.apache.kafka:kafka-clients:3.7.0") {
implementation(rootProject.libs.logback.classic)
implementation(rootProject.libs.logstash.logback.encoder)
implementation(rootProject.libs.logback.syslog4j)
implementation(rootProject.libs.dotenv.kotlin)
implementation(rootProject.libs.json.schema.validator)
implementation(rootProject.libs.com.ibm.mq.allclient)
implementation(rootProject.libs.kafka.clients) {
exclude("org.apache.kafka", "kafka-raft")
exclude("org.apache.kafka", "kafka-server-common")
exclude("org.apache.kafka", "kafka-storage")
exclude("org.apache.kafka", "kafka-storage-api")
exclude("org.apache.kafka", "kafka-streams")
}
implementation("io.confluent:kafka-avro-serializer:$confluentVersion") {
implementation(rootProject.libs.kafka.avro.serializer) {
exclude("org.apache.kafka", "kafka-clients")
exclude("io.confluent", "common-utils")
exclude("io.confluent", "logredactor")
Expand All @@ -63,27 +60,27 @@ subprojects {
exclude("com.google.code.findbugs")
exclude("io.swagger.core.v3")
}
implementation("org.apache.avro:avro:1.11.3") {
implementation(rootProject.libs.avro) {
exclude("org.apache.commons", "commons-compress")
}
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
implementation("io.micrometer:micrometer-core:1.12.5")
implementation("io.micrometer:micrometer-registry-prometheus:1.12.5")
implementation("com.github.seratch:kotliquery:1.9.0")
implementation("org.flywaydb:flyway-core:10.11.1")
implementation("org.flywaydb:flyway-database-postgresql:10.11.1")
implementation("com.zaxxer:HikariCP:5.1.0")
implementation("com.github.navikt:vault-jdbc:1.3.10")
implementation("org.postgresql:postgresql:42.7.3") {
implementation(rootProject.libs.caffeine)
implementation(rootProject.libs.micrometer.core)
implementation(rootProject.libs.micrometer.registry.prometheus)
implementation(rootProject.libs.kotliquery)
implementation(rootProject.libs.flyway.core)
implementation(rootProject.libs.flyway.database.postgresql)
implementation(rootProject.libs.hikaricp)
implementation(rootProject.libs.vault.jdbc)
implementation(rootProject.libs.postgresql) {
exclude("org.apache.commons", "commons-compress")
}
// Brukes av avro?
implementation("org.apache.commons:commons-compress:1.26.1")
implementation(rootProject.libs.commons.compress)


implementation(rootProject.libs.ktor.server.netty)
implementation(rootProject.libs.ktor.server.auth.jwt) {
exclude(group = "junit")
exclude("junit")
}
implementation(rootProject.libs.ktor.server.metrics.micrometer)
implementation(rootProject.libs.ktor.serialization.jackson)
Expand All @@ -94,29 +91,31 @@ subprojects {
implementation(rootProject.libs.ktor.server.status.pages)

// We exclude jdk15on because of security issues. We use jdk18on instead.
implementation("org.bouncycastle:bcprov-jdk18on:1.78.1")
implementation(rootProject.libs.bcprov.jdk18on)

testRuntimeOnly(rootProject.libs.jupiter.engine)

testImplementation(rootProject.libs.jupiter.api)
testImplementation(rootProject.libs.jupiter.params)
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-json:$kotestVersion")
testImplementation("io.kotest.extensions:kotest-assertions-arrow:1.4.0")
testImplementation("io.kotest:kotest-extensions:$kotestVersion")
testImplementation("org.skyscreamer:jsonassert:1.5.1")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.3.1")
testImplementation(rootProject.libs.kotest.assertions.core)
testImplementation(rootProject.libs.kotest.assertions.json)
testImplementation(rootProject.libs.kotest.extensions)
testImplementation(rootProject.libs.kotest.assertions.arrow)


testImplementation(rootProject.libs.jsonassert)
testImplementation(rootProject.libs.mockito.kotlin)
testImplementation(
enforcedPlatform("io.zonky.test.postgres:embedded-postgres-binaries-bom:15.5.1"),
enforcedPlatform(rootProject.libs.embedded.postgres.binaries.bom),
)
testImplementation("io.zonky.test:embedded-postgres:2.0.7") {
testImplementation(rootProject.libs.embedded.postgres) {
exclude("org.apache.commons", "commons-compress")
}
// Legger til manglende binaries for nye Mac's med M1 cpuer. (denne arver versjonen til embedded-postgres-binaries-bom)
testImplementation("io.zonky.test.postgres:embedded-postgres-binaries-darwin-arm64v8") {
testImplementation(rootProject.libs.embedded.postgres.binaries.darwin.arm64v8) {
exclude("org.apache.commons", "commons-compress")
}
testImplementation("org.xmlunit:xmlunit-matchers:2.9.1")
testImplementation(rootProject.libs.xmlunit.matchers)
testImplementation(rootProject.libs.ktor.server.test.host) {
exclude(group = "junit")
exclude(group = "org.eclipse.jetty") // conflicts with WireMock
Expand Down
72 changes: 72 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,36 @@ wiremock = "3.5.3"
jupiter = "5.10.2"
kotlin = "1.9.23"
ktor = "2.3.10"
arrow = "1.2.4"
jackson = "2.17.0"
confluent = "7.6.0"
micrometer = "1.12.5"
flyway = "10.11.1"
kotest = "5.8.1"

[libraries]
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
jul-to-slf4j = { group = "org.slf4j", name = "jul-to-slf4j", version.ref = "slf4j" }
jcl-over-slf4j = { group = "org.slf4j", name = "jcl-over-slf4j", version.ref = "slf4j" }
log4j-over-slf4j = { group = "org.slf4j", name = "log4j-over-slf4j", version.ref = "slf4j" }

logback-classic = { group = "ch.qos.logback", name = "logback-classic", version = "1.5.6" }
logstash-logback-encoder = { group = "net.logstash.logback", name = "logstash-logback-encoder", version = "7.4" }
logback-syslog4j = { group = "com.papertrailapp", name = "logback-syslog4j", version = "1.0.0" }

kittinunf-fuel = { group = "com.github.kittinunf.fuel", name = "fuel", version.ref = "kittinunf" }
kittinunf-fuel-gson = { group = "com.github.kittinunf.fuel", name = "fuel-gson", version.ref = "kittinunf" }

wiremock = { group = "org.wiremock", name = "wiremock", version.ref = "wiremock" }

jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "jupiter" }
jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "jupiter" }
jupiter-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "jupiter" }

kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
kotlin-compiler-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.8.0" }

ktor-server-test-host = { group = "io.ktor", name = "ktor-server-test-host", version.ref = "ktor" }
ktor-server-netty = { group = "io.ktor", name = "ktor-server-netty", version.ref = "ktor" }
Expand All @@ -36,5 +51,62 @@ ktor-server-status-pages = { group = "io.ktor", name = "ktor-server-status-pages
ktor-serialization-jackson = { group = "io.ktor", name = "ktor-serialization-jackson", version.ref = "ktor" }
ktor-client-java = { group = "io.ktor", name = "ktor-client-java", version.ref = "ktor" }

arrow-core = { group = "io.arrow-kt", name = "arrow-core", version.ref = "arrow" }
arrow-fx-coroutines = { group = "io.arrow-kt", name = "arrow-fx-coroutines", version.ref = "arrow" }
arrow-fx-stm = { group = "io.arrow-kt", name = "arrow-fx-stm", version.ref = "arrow" }
arrow-stack = { group = "io.arrow-kt", name = "arrow-stack", version.ref = "arrow" }

jackson-datatype-jsr310 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jsr310", version.ref = "jackson" }
jackson-datatype-jdk8 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jdk8", version.ref = "jackson" }
jackson-module-kotlin = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version.ref = "jackson" }
jackson-dataformat-xml = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-xml", version.ref = "jackson" }

micrometer-core = { group = "io.micrometer", name = "micrometer-core", version.ref = "micrometer"}
micrometer-registry-prometheus = { group = "io.micrometer", name = "micrometer-registry-prometheus", version.ref = "micrometer"}

kotest-assertions-core = { group = "io.kotest", name = "kotest-assertions-core", version.ref = "kotest"}
kotest-assertions-json = { group = "io.kotest", name = "kotest-assertions-json", version.ref = "kotest"}
kotest-extensions = { group = "io.kotest", name = "kotest-extensions", version.ref = "kotest"}
kotest-assertions-arrow = { group = "io.kotest.extensions", name = "kotest-assertions-arrow", version = "1.4.0"}

kafka-clients = { group = "org.apache.kafka", name = "kafka-clients", version = "3.7.0"}
kafka-avro-serializer = { group = "io.confluent", name = "kafka-avro-serializer", version.ref = "confluent"}

flyway-core = { group = "org.flywaydb", name = "flyway-core", version.ref = "flyway"}
flyway-database-postgresql = { group = "org.flywaydb", name = "flyway-database-postgresql", version.ref = "flyway"}

dotenv-kotlin = { group = "io.github.cdimascio", name = "dotenv-kotlin", version = "6.4.1" }

json-schema-validator = { group = "com.networknt", name = "json-schema-validator", version = "1.4.0" }

com-ibm-mq-allclient = { group = "com.ibm.mq", name = "com.ibm.mq.allclient", version = "9.3.5.0"}

avro = { group = "org.apache.avro", name = "avro", version = "1.11.3"}

caffeine = { group = "com.github.ben-manes.caffeine", name = "caffeine", version = "3.1.8"}

kotliquery = { group = "com.github.seratch", name = "kotliquery", version = "1.9.0"}

hikaricp = { group = "com.zaxxer", name = "HikariCP", version = "5.1.0"}

vault-jdbc = { group = "com.github.navikt", name = "vault-jdbc", version = "1.3.10"}

postgresql = { group = "org.postgresql", name = "postgresql", version = "42.7.3"}

commons-compress = { group = "org.apache.commons", name = "commons-compress", version = "1.26.1"}

bcprov-jdk18on = { group = "org.bouncycastle", name = "bcprov-jdk18on", version = "1.78.1"}

jsonassert = { group = "org.skyscreamer", name = "jsonassert", version = "1.5.1"}

mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version = "5.3.1"}

embedded-postgres = { group = "io.zonky.test", name = "embedded-postgres", version = "2.0.7"}
embedded-postgres-binaries-bom = { group = "io.zonky.test.postgres", name = "embedded-postgres-binaries-bom", version = "15.5.1"}
embedded-postgres-binaries-darwin-arm64v8 = { group = "io.zonky.test.postgres", name = "embedded-postgres-binaries-darwin-arm64v8"}

xmlunit-matchers = { group = "org.xmlunit", name = "xmlunit-matchers", version = "2.9.1"}


[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

0 comments on commit b279540

Please sign in to comment.