commonMain, androidMain & iosMain
The three source sets you will live in every day.
Source Sets, Not Folders
Inside shared, code lives in source sets. Each one targets a different platform, and Kotlin compiles them accordingly.
Meet commonMain
commonMain is where shared Kotlin lives. Code here compiles for every target, so it must stay platform-neutral.
All lessons in this course
- The shared Module vs the App Modules
- commonMain, androidMain & iosMain
- Reading the shared build.gradle.kts
- Where Tests Live: commonTest & Friends