Hello everyone, i'm learning how to work with mult...
# multiplatform
m
Hello everyone, i'm learning how to work with multi module in a KMP project. I don't find the best practices about it. Have i to create the submodule in the Shared folder or outside (same level thant iosApp, androidApp & Shared). There is no compose multiplatform in my test project, i just try to share a "sdk". If you have any resource i take it 🙂
j
At the moment iOS is the limitation here, how link code together (However I think Jetbrains work on fix this). Hence right now need one shared module between iOS and Android. The folder structure doesnt really matter, but easiest create them as siblings imo. In Android/Gradle there is no limitation in amount of modules. Myself prefer using feature modules, which is in KMP used by the shared module. So shared module entry point for all app folders like iosApp, androidApp, desktop app, webApp etc.
Personally I like structure https://github.com/chrisbanes/tivi this project using :) Maybe quite large but I like it.
m
Thank you Joel, I saw this repository but i was not sure that it was the good way. i will try. 🙂
j
Maybe a little complex start with however. https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-samples.html Here first time I tested KMP I used imageviewer. However slightly not up to date with latest KMP changes I think.