This is a Kotlin Multiplatform project targeting:
- Android
- iOS
- Web
- Desktop (JVM)
- Server
Path: ./composeApp/src
This module contains code shared across Compose Multiplatform applications.
Subfolders:
-
commonMain(./composeApp/src/commonMain/kotlin)
Code shared across all Compose targets. -
Platform-specific folders
Used when code is required only for a specific platform:iosMain→ iOS-specific code (e.g., Apple CoreCrypto)jvmMain→ Desktop (JVM) specific code- Other folders follow the same naming convention
Path: ./iosApp/iosApp
Contains the iOS application entry point.
Even when using Compose Multiplatform UI, this module is required. This is also where SwiftUI code should be added.
Path: ./server/src/main/kotlin
Contains the Ktor server application.
Path: ./shared/src
Contains code shared across all targets in the project.
commonMain(./shared/src/commonMain/kotlin)
The most important folder for shared business logic.
Platform-specific folders can also be used here if required.
Build the debug version:
macOS / Linux
./gradlew :composeApp:assembleDebug
Windows
.\gradlew.bat :composeApp:assembleDebug
Desktop (JVM) Application
Run the development version:
macOS / Linux
./gradlew :composeApp:run
Windows
.\gradlew.bat :composeApp:run
Server Application
Run the Ktor server:
macOS / Linux
./gradlew :server:run
Windows
.\gradlew.bat :server:run
Web Application
Wasm Target (faster, modern browsers)
macOS / Linux
./gradlew :composeApp:wasmJsBrowserDevelopmentRun
Windows
.\gradlew.bat :composeApp:wasmJsBrowserDevelopmentRun
JS Target (slower, legacy browser support)
macOS / Linux
./gradlew :composeApp:jsBrowserDevelopmentRun
Windows
.\gradlew.bat :composeApp:jsBrowserDevelopmentRun
iOS Application
Run using one of the following methods:
Use the run configuration in the IDE
Open the /iosApp directory in Xcode and run from there
📚 Learn More
Kotlin Multiplatform
Compose Multiplatform
Kotlin/Wasm
💬 Feedback & Support
Compose/Web & Kotlin/Wasm Slack:
#compose-web → https://slack-chats.kotlinlang.org/c/compose-web
Report issues on YouTrack:
https://youtrack.jetbrains.com/newIssue?project=CMP