Maybe a dumb question... but I currently have an android project with 3 gradle modules.
1. android app module
2. jvm only networking module (okhttp)
3. jvm only db module (sqldelight)
what would be the technique to migrate to a kmp + kmp compose app? This is what I think the steps would be but will take any advice
1. adroid app module can stay, but have most stuff transplanted into a sharedApp module. this will contain compose multiplatform
2. networking module has to be converted to ktor
3. db module can stay the same because sqldelight is kmp already?
or would I have to combine all of my networking and db stuff into a single "shared" module? (for example, every video ive seen so far on kmp will always show a single shared module so maybe thats what i should be doing too?)
👀 1
p
Pablichjenkov
08/19/2023, 9:56 PM
Keep the same 3 modules. The only thing is that the module's structure will change, by structure I mean the source directories, once you apply the multiplatform plugin in the module. But the module interdependency keeps the same
c
Colton Idle
08/19/2023, 10:09 PM
cool okay. so there isn't some sort of "weird" rule where all shared code has to go into the same shared module. i should be able to convert each module into kmp one at a time and keep my same general modular, module structure. thanks for the tips
j
Jacob Ras
08/19/2023, 10:19 PM
Yep! That's the nice thing about this flexibility. I'm doing that in one project too: change module to Multiplatform, rename main to androidMain (so all code remains unchanged) and then I slowly move stuff to common so it can be reused 🚀
K 2
p
Pablichjenkov
08/19/2023, 10:29 PM
I visualize module interdependency like in the picture bellow. Also there are many projects out as examples, check tivi App from chris banes, that is a module party App lol. I created this simple example as starting point for an API consumer project. https://github.com/pablichjenkov/kmp-amadeus-api