I'm wondering why all the compose multiplatform pr...
# compose-desktop
z
I'm wondering why all the compose multiplatform projects usually have like their platforms and common modules in the root project. like
android
desktop
common
wouldnt it be easier to have a single
app
module and then doing platform specific code in the sourcesets? so
commonMain
androidMain
desktopMain
👍 1
m
You can do that btw, it's your choice in the end. But having separate module is better specially for industry level projects, where you are going to have the shared code in a separate repository and published to maven or something and each target having that shared code as a dependency and with this you can deploy web frontend and backend easily without having all the platforms code deployed.
3
b
Also having each app in separate module allows for simpler gradle config and plugin management
2
AGP for example used to be a nightmare to integrate with KMP plugin