From 29953d2c20634daf5aeb97c3c97378bb0c92ca22 Mon Sep 17 00:00:00 2001 From: Kgothatso Ngako Date: Mon, 30 Mar 2026 13:25:19 +0200 Subject: [PATCH] Use the CIO engine for ktor All platforms will use the same http engine. --- composeApp/build.gradle.kts | 5 +---- gradle/libs.versions.toml | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index c5b6225c..24fa69e1 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -41,8 +41,6 @@ kotlin { implementation(libs.androidx.room.sqlite.wrapper) implementation(libs.compose.uiToolingPreview) implementation(libs.okhttp.coroutines) - - implementation(libs.ktor.client.okhttp) } commonMain.dependencies { implementation(libs.androidx.lifecycle.viewmodelCompose) @@ -71,6 +69,7 @@ kotlin { implementation(libs.kotlinx.serialization.json) implementation(libs.ktor.client.core) + implementation(libs.ktor.client.cio) implementation(libs.ktor.client.websockets) implementation(libs.ktor.serialization.kotlinx.json) @@ -80,12 +79,10 @@ kotlin { implementation(libs.kotlin.test) } jvmMain.dependencies { - implementation(libs.ktor.client.okhttp) implementation(compose.desktop.currentOs) implementation(libs.kotlinx.coroutinesSwing) } iosMain.dependencies { - implementation(libs.ktor.client.darwin) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4d19e8c8..ca118ff9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -60,12 +60,10 @@ kotlinx-coroutinesSwing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-s kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } -ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } -ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } +ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } ktor-client-websockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" } ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "navigationCompose" } -okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" } okhttp-coroutines = { group = "com.squareup.okhttp3", name = "okhttp-coroutines", version.ref = "okhttp" } vitorpamplona-quartz = { module = "com.vitorpamplona.quartz:quartz", version.ref = "quartz" }