Skip to content

Commit

Permalink
Endre ktor-deps til å bruke libs.versions.toml
Browse files Browse the repository at this point in the history
Forhåpentligvis skal dependabot få med seg nye versjoner nå
  • Loading branch information
hestad committed Nov 24, 2023
1 parent d6a92db commit d537817
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
21 changes: 10 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ plugins {
}

version = "0.0.1"
val ktorVersion: String by project

subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
Expand Down Expand Up @@ -75,17 +74,17 @@ subprojects {
implementation("com.github.navikt:vault-jdbc:1.3.10")
implementation("org.postgresql:postgresql:42.7.0")

implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jwt:$ktorVersion") {
implementation(rootProject.libs.ktor.server.netty)
implementation(rootProject.libs.ktor.server.auth.jwt) {
exclude(group = "junit")
}
implementation("io.ktor:ktor-server-metrics-micrometer:$ktorVersion")
implementation("io.ktor:ktor-serialization-jackson:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-server-call-id:$ktorVersion")
implementation("io.ktor:ktor-server-call-logging:$ktorVersion")
implementation("io.ktor:ktor-server-forwarded-header:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation(rootProject.libs.ktor.server.metrics.micrometer)
implementation(rootProject.libs.ktor.serialization.jackson)
implementation(rootProject.libs.ktor.server.content.negotiation)
implementation(rootProject.libs.ktor.server.call.id)
implementation(rootProject.libs.ktor.server.call.logging)
implementation(rootProject.libs.ktor.server.forwarded.header)
implementation(rootProject.libs.ktor.server.status.pages)

testRuntimeOnly(rootProject.libs.jupiter.engine)

Expand All @@ -108,7 +107,7 @@ subprojects {
// Legger til manglende binaries for nye Mac's med M1 cpuer.
testImplementation("io.zonky.test.postgres:embedded-postgres-binaries-darwin-arm64v8")
testImplementation("org.xmlunit:xmlunit-matchers:2.9.1")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion") {
testImplementation(rootProject.libs.ktor.server.test.host) {
exclude(group = "junit")
exclude(group = "org.eclipse.jetty") // conflicts with WireMock
exclude(group = "org.eclipse.jetty.http2") // conflicts with WireMock
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ org.gradle.jvmargs=-Xmx4000m
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.daemon=true
ktorVersion=2.3.5
13 changes: 13 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ kittinunf = "2.3.1"
wiremock = "3.3.1"
jupiter = "5.10.1"
kotlin = "1.9.21"
ktor = "2.3.6"

[libraries]
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
Expand All @@ -23,5 +24,17 @@ kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", vers
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" }

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" }
ktor-server-auth-jwt = { group = "io.ktor", name = "ktor-server-auth-jwt", version.ref = "ktor" }
ktor-server-metrics-micrometer = { group = "io.ktor", name = "ktor-server-metrics-micrometer", version.ref = "ktor" }
ktor-server-content-negotiation = { group = "io.ktor", name = "ktor-server-content-negotiation", version.ref = "ktor" }
ktor-server-call-id = { group = "io.ktor", name = "ktor-server-call-id", version.ref = "ktor" }
ktor-server-call-logging = { group = "io.ktor", name = "ktor-server-call-logging", version.ref = "ktor" }
ktor-server-forwarded-header = { group = "io.ktor", name = "ktor-server-forwarded-header", version.ref = "ktor" }
ktor-server-status-pages = { group = "io.ktor", name = "ktor-server-status-pages", version.ref = "ktor" }
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" }

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1 change: 0 additions & 1 deletion test-common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Contains shared test-data, functions and extension funcions to be used across modules
val ktorVersion: String by project
dependencies {
val kotestVersion = "5.8.0"

Expand Down
5 changes: 2 additions & 3 deletions web-regresjonstest/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Inneholder regresjonstester for web-laget (black-box asserting).
// Separert til sin egen modul for å kunne bygges parallelt med de andre testene på byggserveren.
val ktorVersion: String by project
dependencies {
implementation(project(":domain"))
implementation(project(":database"))
Expand Down Expand Up @@ -31,8 +30,8 @@ dependencies {

implementation(project(":person:domain"))

implementation("io.ktor:ktor-client-java:$ktorVersion")
implementation("io.ktor:ktor-server-test-host:$ktorVersion") {
implementation(rootProject.libs.ktor.client.java)
implementation(rootProject.libs.ktor.server.test.host) {
exclude(group = "junit")
exclude(group = "org.eclipse.jetty") // conflicts with WireMock
exclude(group = "org.eclipse.jetty.http2") // conflicts with WireMock
Expand Down

0 comments on commit d537817

Please sign in to comment.