Kotlin Multiplatform project structure

Kotlin Multiplatform project structure

Explorer

  • .gradle…, not committed
  • .idea…, not committed
  • .kotlin…, not committed
  • androidApp
  • build.gradle.kts
  • build…, not committed
  • confignew
  • desktopApp…
  • gradle
  • libs.versions.toml
  • wrapper…
  • iosApp
  • iosApp.xcodeproj…
  • scriptsnew
  • check.shnew
  • shared
  • build.gradle.kts
  • build…, not committed
  • schemas…new
  • .editorconfignew
  • .gitignore
  • AGENTS.mdnew
  • README.md
  • build.gradle.kts
  • gradle.properties
  • gradlew
  • gradlew.bat
  • local.properties, not committed
  • settings.gradle.kts
  1. # Create the project in the KMP wizard (Android and iOS, share UI) and download it

    open https://kmp.jetbrains.com
  2. # Or create it in IntelliJ IDEA or Android Studio with the Kotlin Multiplatform plugin: New Project > Kotlin Multiplatform

    idea .
  3. # Check your setup (JDK, Android SDK, Xcode on a Mac)

    ./gradlew --version && xcodebuild -version
  4. # Build and run the Android app

    ./gradlew :androidApp:installDebug
  5. # Run shared tests on every target

    ./gradlew :shared:allTests
  6. # Open the iOS app in Xcode and run it on a simulator

    open iosApp/iosApp.xcodeproj