From 485b7bca52d449ec5954bf7a447380ca24b361c6 Mon Sep 17 00:00:00 2001 From: StefMa Date: Sat, 9 Sep 2023 13:01:11 +0200 Subject: [PATCH] Add correct ktor client dependencies to native platforms --- build.gradle.kts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f6d9d5b..d93f10f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,7 +27,6 @@ kotlin { when { hostOs == "Mac OS X" && isArm64 -> macosArm64("native") hostOs == "Mac OS X" && !isArm64 -> macosX64("native") - hostOs == "Linux" && isArm64 -> linuxArm64("native") hostOs == "Linux" && !isArm64 -> linuxX64("native") isMingwX64 -> mingwX64("native") else -> throw GradleException("Host OS is not supported in Kotlin/Native.") @@ -58,7 +57,13 @@ kotlin { val jvmTest by getting val nativeMain by getting { dependencies { - implementation("io.ktor:ktor-client-darwin:$ktorVersion") + when { + hostOs == "Mac OS X" -> implementation("io.ktor:ktor-client-darwin:$ktorVersion") + hostOs == "Linux"-> implementation("io.ktor:ktor-client-curl:$ktorVersion") + isMingwX64 -> implementation("io.ktor:ktor-client-winhttp:$ktorVersion") + else -> throw GradleException("Host OS is not supported in Kotlin/Native.") + } + } } val nativeTest by getting