I just wasted a bunch of time figuring out why add...
# random
t
I just wasted a bunch of time figuring out why adding https://search.maven.org/artifact/com.ensarsarajcic.kotlinx/serialization-msgpack/0.5.5/jar to my pom.xml didn't allow me to import the classes. Turns out it's full of .knm files, not .class files, and I needed the
...-jvm
artifact instead. I guess this is a multiplatform thing? Is there some faster way to tell which dependency I need for JVM stuff, or is it just guess and check?
s
Might not be the answer you want, but Gradle should be able to pick the right variants automatically
t
Yeah, I tried Gradle for a while, but I ended up going back to Maven because the Gradle build script API was really poorly documented.
t
I guess this is a multiplatform thing?
Yes. Simply speaking we publish in main publication references to platform specific publications as in the example above
-jvm
. In Gradle metadata file in publication you could find what is the expected publication specific for the platform.
👍 1
e
ideally your consumer would understand Gradle module metadata and it would all work out, but the library does have a way to update the multiplatform POM so that naive Maven resolution gets redirected to the JVM artifact