From ea60a4066ca556a7dae42d3df0a5913a8d1e6e21 Mon Sep 17 00:00:00 2001 From: Zoe Maas Date: Mon, 28 Oct 2024 14:17:50 +0100 Subject: [PATCH] refactor: Added the rest of the libraries to libs.versions.toml --- gradle/libs.versions.toml | 11 +++++++++++ modules/local-kms/build.gradle.kts | 8 ++++---- modules/openapi/build.gradle.kts | 1 - .../openid-federation-client/build.gradle.kts | 2 +- .../openid-federation-common/build.gradle.kts | 16 +++++++--------- modules/persistence/build.gradle.kts | 6 +++--- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e81cceda..0456ccf1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,6 +20,10 @@ springboot = "3.3.1" springDependencyManagement = "1.1.5" kermitLogging = "2.0.4" kotlinxDatetime = "0.6.1" +sqldelight = "2.0.2" +hikari = "5.1.0" +postgresql = "42.7.3" +nimbusJoseJwt = "9.40" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } @@ -41,6 +45,8 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t kotlinx-coroutines-test-js = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test-js", version.ref = "kotlinxCoroutines" } kermit-logging = { module = "co.touchlab:kermit", version.ref = "kermitLogging"} ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } +ktor-client-core-jvm = { module = "io.ktor:ktor-client-core-jvm", version.ref = "ktor" } +ktor-client-core-js = { module = "io.ktor:ktor-client-core-js", version.ref = "ktor" } ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } ktor-client-auth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor" } @@ -48,6 +54,7 @@ ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" } ktor-client-mock-js = { module = "io.ktor:ktor-client-mock-js", version.ref = "ktor" } ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } +ktor-client-cio-jvm = { module = "io.ktor:ktor-client-cio-jvm", version.ref = "ktor" } ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" } kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect" } @@ -60,6 +67,10 @@ postgres = { module = "org.postgresql:postgresql" } springboot-testcontainer = { group = "org.springframework.boot", name = "spring-boot-testcontainers"} testcontainer-postgres = { group = "org.testcontainers", name = "postgresql"} testcontainer-junit = { group = "org.testcontainers", name = "junit-jupiter"} +sqldelight-jdbc-driver = { group = "app.cash.sqldelight", name = "jdbc-driver", version.ref = "sqldelight" } +hikari = { group = "com.zaxxer", name = "HikariCP", version.ref = "hikari" } +postgresql = { group = "org.postgresql", name = "postgresql", version.ref = "postgresql" } +nimbus-jose-jwt = { group = "com.nimbusds", name = "nimbus-jose-jwt", version.ref = "nimbusJoseJwt" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" } diff --git a/modules/local-kms/build.gradle.kts b/modules/local-kms/build.gradle.kts index 95c984b4..c22e15d2 100644 --- a/modules/local-kms/build.gradle.kts +++ b/modules/local-kms/build.gradle.kts @@ -42,10 +42,10 @@ kotlin { jvmMain { dependencies { - implementation("app.cash.sqldelight:jdbc-driver:2.0.2") - implementation("com.zaxxer:HikariCP:5.1.0") - implementation("org.postgresql:postgresql:42.7.3") - implementation("com.nimbusds:nimbus-jose-jwt:9.40") + implementation(libs.sqldelight.jdbc.driver) + implementation(libs.hikari) + implementation(libs.postgresql) + implementation(libs.nimbus.jose.jwt) } } diff --git a/modules/openapi/build.gradle.kts b/modules/openapi/build.gradle.kts index 0e3e3500..a1d126f7 100644 --- a/modules/openapi/build.gradle.kts +++ b/modules/openapi/build.gradle.kts @@ -16,7 +16,6 @@ project.extra.set("openApiPackage", "com.sphereon.oid.fed.openapi") val profiles = project.properties["profiles"]?.toString()?.split(",") ?: emptyList() val isModelsOnlyProfile = profiles.contains("models-only") -val ktorVersion = "2.3.11" repositories { mavenCentral() diff --git a/modules/openid-federation-client/build.gradle.kts b/modules/openid-federation-client/build.gradle.kts index 556b88cb..e643499a 100644 --- a/modules/openid-federation-client/build.gradle.kts +++ b/modules/openid-federation-client/build.gradle.kts @@ -69,7 +69,7 @@ kotlin { val jvmMain by getting { dependencies { implementation(libs.ktor.client.cio) - implementation("com.nimbusds:nimbus-jose-jwt:9.40") + implementation(libs.nimbus.jose.jwt) } } diff --git a/modules/openid-federation-common/build.gradle.kts b/modules/openid-federation-common/build.gradle.kts index 27c71ba0..9c9ee65f 100644 --- a/modules/openid-federation-common/build.gradle.kts +++ b/modules/openid-federation-common/build.gradle.kts @@ -6,8 +6,6 @@ plugins { kotlin("plugin.serialization") version "2.0.0" } -val ktorVersion = "2.3.11" - repositories { mavenCentral() mavenLocal() @@ -70,9 +68,9 @@ kotlin { } val jvmMain by getting { dependencies { - implementation("io.ktor:ktor-client-core-jvm:$ktorVersion") - runtimeOnly("io.ktor:ktor-client-cio-jvm:$ktorVersion") - implementation("com.nimbusds:nimbus-jose-jwt:9.40") + implementation(libs.ktor.client.core.jvm) + runtimeOnly(libs.ktor.client.cio.jvm) + implementation(libs.nimbus.jose.jwt) } } val jvmTest by getting { @@ -127,11 +125,11 @@ kotlin { val jsMain by getting { dependencies { - runtimeOnly("io.ktor:ktor-client-core-js:$ktorVersion") - runtimeOnly("io.ktor:ktor-client-js:$ktorVersion") + runtimeOnly(libs.ktor.client.core.js) + runtimeOnly(libs.ktor.client.js) implementation(npm("typescript", "5.5.3")) - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0-RC") + implementation(libs.kotlinx.serialization.json) + implementation(libs.kotlinx.coroutines.core.js) } } diff --git a/modules/persistence/build.gradle.kts b/modules/persistence/build.gradle.kts index 942bdeab..9de1b2b3 100644 --- a/modules/persistence/build.gradle.kts +++ b/modules/persistence/build.gradle.kts @@ -40,9 +40,9 @@ kotlin { jvmMain { dependencies { - implementation("app.cash.sqldelight:jdbc-driver:2.0.2") - implementation("com.zaxxer:HikariCP:5.1.0") - implementation("org.postgresql:postgresql:42.7.3") + implementation(libs.sqldelight.jdbc.driver) + implementation(libs.hikari) + implementation(libs.postgresql) } } }