Hey Everyone ✌️. Can someone guide me what is d/w of this ktor library
Copy code
"io.ktor:ktor-client-core:2.0.0-beta-1"
In android
Copy code
"io.ktor:ktor-client-android:2.0.0-beta-1"
In Ios
Copy code
"io.ktor:ktor-client-ios:2.0.0-beta-1"
Do we need to add core, android and ios library in the commonMain, androidMain and iosMain respectively?
Copy code
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting
val androidTest by getting
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by creating {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
Vivek Modi
04/11/2022, 2:46 PM
Or just
core
will be fine to add only in
commonMain
?
l
Landry Norris
04/11/2022, 3:00 PM
I usually do core in commonMain, and if the CIO engine is good for you, you don't need anything else. If you want to specify the engine, I usually expect/actual the native engines, which requires only the client-{platform} dependency in the platform source set.