One of the 3rd party sdk bundles transitive `kotli...
# coroutines
p
One of the 3rd party sdk bundles transitive
kotlinx-coroutines-android:1.4.3-native-mt
dependency. Can’t find information what does it mean? I need to force
-native-mt
variant across my app? Or because I build android application I can safely resolve to normal
1.4.3
variant?
The issue is that gradle ups version by default and artifact change isn’t visible
Copy code
+--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3-native-mt -> 1.5.0 (*)
l
You can search for "1.5.0" and you'll see what is upgrading it. Native mt is needed if you want withContext and other Darwin (iOS, macOS, etc) stuff like Dispatchers.Main to work. If you're doing JVM or JS, you don't need it.
p
Thank you for taking time to answer! So can I say that android sdk (library) which exposes
-native-mt
artifact is a mistake (leaking impl detail)?
l
Not really, because it doesn't affect you in any way on Android.
🙏 1
The behavior changes are only on Kotlin/Native.
I guess this SDK/library also supports iOS
p
They do. I’m not up-to-date with MPP development. But likely iOS builds don’t consume .aar artifact through maven repo. Maybe it’s a purist in me. I just find confusing
-native-mt
dep exposed to android variant. I would assume it’s a dependency for core (common) kotlin code but not to final android variant. Anyway, the sdk works as far as I see so no real issue here. Thank you for confirmation
l
iOS builds consume klib artifacts from the same repo most likely, and it's published as part of the same distributed build, so same versions so common code doesn't break.