Hey folks, I am porting an android library using `...
# multiplatform
t
Hey folks, I am porting an android library using
ktor
&
kotlinx.serialization
to a multiplatform library, but I am not sure which version of the multiplatform dependencies I should use. The android consumer of that library uses Kotlin
1.3.72
and I can't change that to
1.4.x
, yet. My android library uses ktor
1.3.1
and kotlinx.serialization
0.20.0
, but if I apply those versions to the multiplatform dependencies, I am running into an Kotlin/Native error:
Copy code
e: Could not find "/Users/X/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-serialization-iosx64/1.3.1/df889ad1b8cc9fc91850d7d320b61e95597b1ce7/ktor-client-serialization.klib" in [/Users/X/Documents/repos/multiplatform-graph, /Users/X/.konan/klib, /Users/X/.konan/kotlin-native-macos-1.3.70/klib/common, /Users/X/.konan/kotlin-native-macos-1.3.70/klib/platform/ios_x64].
Thanks in advance!
l
Why the Android consumer doesn't use Kotlin 1.4?
t
Its a huge code base and there are still some blockers left updating to 1.4. It's out of my control 🤷
l
Multiplatform (in alpha) and being locked out of 1.4 are not friends. I think you can try setting language API to 1.3 though, so that might work for the Android apps, but that means you give up stdlib improvements in 1.4 and give up libraries relying on 1.4.
t
Give Up the versions of the libs relying on 1.4 right? I mean, couldn't I just earlier versions?
l
Yes (though far fron ideal), unless they are also targeting Kotlin/Native
t
How could I figure out which are the versions I'd need? Talking about
ktor
kotlinx.serialization
and
coroutines
.
l
Good luck for #serialization
For #coroutines too actually, but more for serialization since there's no binary and source compatibility for 1.3 compatible versions to 1.4 compatible versions.
In other words, you need Kotlin 1.4 to stay relevant if you go the Multiplatform route, and that Android project will have to be migrated to 1.4.10 or 1.4.20+ (that have a bunch of fixes that might have prevented migration).
t
Sure, it's just a matter of time until we update to 1.4, I am just trying to find a way to unblock me until then.
l
Well, you can work on the library with 1.4 and a sample Android app to check it while making it multiplatform, and use it in the Android app you're referring to once it's on 1.4
t
That would be an option in theory, but not in my case. It's an internal tooling that I can't test end to end without the imput from the client. Let me review the blockers for 1.4, maybe I can temporarily work around them 👍
a
It seems like both you and this thread’s OP have a similar problem. If you got a project reproducing it, please consider posting it in a separate issue, or in the comment section of https://youtrack.jetbrains.com/issue/KT-42482.