This is a Kotlin Multiplatform project targeting Android, iOS, Web, Desktop.
-
/composeAppis for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:commonMainis for code that’s common for all targets.- Other folders are for Kotlin code that will be compiled for only the platform indicated in the
folder name.
For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app,
iosMainwould be the right folder for such calls.
-
/iosAppcontains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
Learn more about Kotlin Multiplatform, Compose Multiplatform, Kotlin/Wasm…
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack channel #compose-web. If you face any issues, please report them on GitHub.
You can open the web application by running the :composeApp:wasmJsBrowserDevelopmentRun Gradle
task.
- Add new Gradle configuration
- Enter name:
desktopApp - Enter run:
composeApp:run - Apply
- Install sdkman https://sdkman.io/install/
- Install compatible gradle. For now, recommended version is 8.10
sdk install gradle 8.10- Install JDK, recommended version: 17.0.14-zulu
sdk install java 17.0.14-zulu- Setting up android studio to use gradle and
JAVA_HOMEUpdate the gradle to use local installed version of gradle: /home/ /.sdkman/candidates/gradle/current Config to use JAVA_HOME version - If running in Android studio giving error, try to run
gradle composeApp:run