Francis Mariano
07/14/2021, 4:02 PMnative-mt
version of Coroutines was removed. The version of Coroutines in the 0.7.0 kable is 1.5.0
The readme explains about configuration and I get a bit confusing in some points:
• Can the version of coroutine on androidMain be greater than kable coroutine version?
• Can version of coroutine (native-mt) on nativeMain be greater than kable coroutine version?
• Can the line 10 be removed?
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.juul.kable:core:0.7.0") // here the version of Coroutine is 1.5.0
}
}
val androidMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") // here the version of Coroutine is greater // line 10
}
}
val nativeMain by creating {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1-native-mt") {
version {
strictly("1.5.1-native-mt")
}
}
}
}
}
}
travis
07/14/2021, 4:51 PM-native-mt
do not need to match. So, it is valid to use Coroutines 1.5.1 and 1.5.0 for iOS.Francis Mariano
07/14/2021, 5:07 PMtravis
07/14/2021, 5:15 PMandroidMain
is optional, as it is defined in commonMain
.
(in the updated README in the PR linked above)Francis Mariano
07/14/2021, 5:27 PMIF
-native-mt is not required, right?travis
07/14/2021, 5:30 PM-native-mt
on Native, so if you use Kable on your project on a Native target (e.g. iOS) then you'll need kotlinx-coroutines-core:$version-native-mt
, but if you aren't using Kable for your Native target, then you don't need a specific version of Coroutines for that target.-native-mt
) of Coroutines, but only for Native targets.-native-mt
implementation of Coroutines with the mainline Coroutines.Francis Mariano
07/14/2021, 5:34 PMtravis
07/14/2021, 5:39 PMcommonMain
dependency on Coroutines provides the needed Coroutines for the Android target.androidMain
for kotlinx-coroutines-android
, which adds additional Android Coroutines features.Francis Mariano
07/14/2021, 5:41 PMval commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}")
implementation("com.juul.kable:core:${kableVersion}")
}
}
coroutinesVersion
cannot be grater than version of Coroutine in kabletravis
07/14/2021, 5:42 PM-native-mt
is used for Native targets, the Coroutines version can be higher than Kable uses.Francis Mariano
07/14/2021, 5:47 PMapi("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
implementation("com.juul.kable:core:0.7.0")
That not work here. Must be another problem so. I will check here. Thank you very much againtravis
07/14/2021, 5:48 PMFrancis Mariano
07/14/2021, 5:54 PMval commonMain by getting {
dependencies {
// api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
implementation("com.juul.kable:core:0.7.0")
}
}
val iosMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1-native-mt") {
version {
strictly("1.5.1-native-mt")
}
}
}
}
That works fine, but
val commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
implementation("com.juul.kable:core:0.7.0")
}
}
val iosMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1-native-mt") {
version {
strictly("1.5.1-native-mt")
}
}
}
}
Fails the sync gradle
Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1.
Required by:
project :shared
Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.5.1-native-mt}.
Required by:
project :shared
Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0.
Required by:
project :shared > com.juul.kable:core:0.7.0 > com.juul.kable:core-iosarm64:0.7.0
travis
07/14/2021, 5:58 PMiosMain
needs to specify the Coroutines artifact for iOS (e.g. kotlinx-coroutines-core-iosx64
).dependsOn(iosMain)
?Francis Mariano
07/14/2021, 6:09 PMiosMain
by iosX64Main
and iosArm64Main
. Works fine now.travis
07/14/2021, 6:10 PMREADME
, I've updated it to hopefully make it more clear.