Skip to content

Commit

Permalink
Add correct ktor client dependencies to native platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
StefMa committed Sep 10, 2023
1 parent 0a67b50 commit 485b7bc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 485b7bc

Please sign in to comment.