Skip to content

Commit

Permalink
refactor: Picking common dependencies from libs.versions.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe Maas committed Oct 25, 2024
1 parent 01c5248 commit 5b1a6f9
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 23 deletions.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinxSerialization"}
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-core-js = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-js", version.ref = "kotlinxCoroutines" }

kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
kermit-logging = { module = "co.touchlab:kermit", version.ref = "kermitLogging"}
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
Expand Down
2 changes: 1 addition & 1 deletion modules/admin-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
testImplementation(libs.testcontainer.postgres)
runtimeOnly(libs.postgres)
runtimeOnly(libs.springboot.devtools)
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.11")
implementation(libs.ktor.serialization.kotlinx.json)
}

kotlin {
Expand Down
6 changes: 3 additions & 3 deletions modules/local-kms/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "2.0.0"
alias(libs.plugins.kotlinMultiplatform)
id("app.cash.sqldelight") version "2.0.2"
}

Expand Down Expand Up @@ -35,8 +35,8 @@ kotlin {
commonMain {
dependencies {
api(projects.modules.openapi)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.1")
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.serialization.core)
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/logger/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "2.0.0"
alias(libs.plugins.kotlinMultiplatform)
}

repositories {
Expand Down
10 changes: 5 additions & 5 deletions modules/openapi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
kotlin("multiplatform") version "2.0.0"
alias(libs.plugins.kotlinMultiplatform)
kotlin("plugin.serialization") version "2.0.0"
id("org.openapi.generator") version "7.7.0"
id("maven-publish")
Expand Down Expand Up @@ -148,10 +148,10 @@ kotlin {
val commonMain by getting {
kotlin.srcDir("build/copy/src/commonMain/kotlin")
dependencies {
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0")
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.kotlinx.serialization.json)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ abstract class AbstractFetchService<CallbackServiceType>(open val platformCallba
}
}

class FetchService(override val platformCallback: IFetchCallbackService = DefaultCallbacks.jwtService()): AbstractFetchService<IFetchCallbackService>(platformCallback), IFetchService {
class FetchService(override val platformCallback: IFetchCallbackService = DefaultCallbacks.fetchService()): AbstractFetchService<IFetchCallbackService>(platformCallback), IFetchService {

override fun platform(): IFetchCallbackService {
return this.platformCallback
Expand Down
18 changes: 9 additions & 9 deletions modules/openid-federation-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ kotlin {
val commonMain by getting {
dependencies {
api(projects.modules.openapi)
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-logging:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-client-auth:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.1")
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.logging)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.client.auth)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.serialization.core)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation("io.ktor:ktor-client-mock:$ktorVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0-RC")
implementation(libs.ktor.client.mock)
implementation(libs.kotlinx.coroutines.test)
}
}
val jvmMain by getting {
Expand Down
2 changes: 1 addition & 1 deletion modules/persistence/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "2.0.0"
alias(libs.plugins.kotlinMultiplatform)
id("app.cash.sqldelight") version "2.0.2"
}

Expand Down
4 changes: 2 additions & 2 deletions modules/services/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "2.0.0"
alias(libs.plugins.kotlinMultiplatform)
kotlin("plugin.serialization") version "2.0.0"
}

Expand All @@ -22,7 +22,7 @@ kotlin {
api(projects.modules.persistence)
api(projects.modules.openidFederationCommon)
api(projects.modules.localKms)
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.11")
implementation(libs.ktor.serialization.kotlinx.json)
}
}

Expand Down

0 comments on commit 5b1a6f9

Please sign in to comment.