Folder Structure
Compose MultiPlatform
As I mentioned before, the basic scaffold is generated by the KMP Wizard by JetBrains. So, composeApp is the root for Compose UI. As of now, there’s only androidMain, because I didn’t choose shared UI or any other platform (like Desktop). So I think we can move most of the existing code to composeApp/commonMain and this should still work.
Project folder structure
composeApp/androidMainis the Android App SourceiosAppis the iOS App Sourceshared/src/androidMaincontains Android platform specific codeshared/src/commonMaincontains platform agnostic codes (like interfaces)shared/src/iosMaincontains iOS platform specific code
Android folder structure
Ideal Folder Structure (Future)
composeApp/commonMainwill hold most of the shared UI (across Android / Desktop and iOS)composeApp/androidMainwill hold Android specific UI elementscomposeApp/iosMainwill hold iOS specific UI elementscomposeApp/desktopMainwill hold desktop specific iOS