Difficulty importing `kragle` library in `multipl...
# multiplatform
c
Difficulty importing
kragle
library in
multiplatform
example app - todo I created a Minimal reproducible example using the
multiplatform
todo app. When imported from the common module it fails, but when imported from the desktop module it works. I'm confused. I've raised an question on
krangl
repo - Issue#132
t
is krangl a multiplatform library now?
looks like it’s still jvm only
c
Looks like it is JVM only. But I wish to use it for Android and Desktop with JVM. And I've seen people use Retrofit in desktop. So I guess the problem here is how I setup the project. @Tijl can you help me setup krangl for desktop and android?
t
you’re trying to import it into the
commonMain
sourceset, instead use the other sourcesets you have for android/jvm (e.g.
androidMain
/
jvmMain
)
unfortunately then sharing code between android and jvm is a bit of a minefield at the moment,
c
For my understanding How does the IDE / gradle identify commonMain can't have JVM libs or code?
t
a feature of gradle called module metadata
but conceptually it’s kind of like asking “how does a c compiler identify it can’t compile haskel
c
Haha, good analogy.
t
common just requires entirely different artifacts (containing source code) than jvm (jars with jvm bytecode)
since they both use gradle it’s not strange you made the assumption.. I also think it only warns you during build now
j
"Kotlin Data Science".replace("Data","JVM Autoboxing")