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
mohamed rejeb
08/03/2023, 4:49 AM
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
Big Chungus
08/03/2023, 10:16 AM
Also having each app in separate module allows for simpler gradle config and plugin management
➕ 2
Big Chungus
08/03/2023, 10:17 AM
AGP for example used to be a nightmare to integrate with KMP plugin