Kotlin Multiplatform (KMP)
Share business logic across Android, iOS, desktop, and web from a single Kotlin codebase.
4-6 weeks
6.2k students
4.7 rating
Progress0/44 lessons
Key Topics You'll Master
1
KMP Overview & Project Setup2
Source Sets & Default Target Hierarchy3
expect/actual APIs4
Concurrency & Memory on Kotlin/Native5
Networking & Serialization (Shared Data Layer)6
Storage & Caching7
Architecture & DI (KMP-friendly)8
Compose Multiplatform (Optional Shared UI)9
iOS Integration & Publishing10
Testing & CI for KMP11
Build, Release & Platform Notes+0
more...Learning Outcomes
- Create and structure a KMP project with Gradle and the K2 compiler
- Organize common vs platform-specific code using the default target hierarchy
- Design cross-platform APIs with expect/actual and interface-driven architecture
- Implement shared networking and JSON serialization for Android & iOS
- Use modern Kotlin/Native memory management and concurrency patterns safely
- Persist data with multiplatform storage and apply cache/invalidation strategies
- Adopt Compose Multiplatform for shared UI where it makes sense
- Integrate with iOS via CocoaPods or Swift Package Manager and publish frameworks
- Test common and platform code; set up CI for multi-target builds
Prerequisites
- Comfortable with Kotlin basics (functions, classes, collections)
- Gradle fundamentals (plugins, dependencies, tasks)
- Android Studio or IntelliJ IDEA installed (latest stable)
- Basic platform familiarity: Android and/or iOS
1
KMP Overview & Project SetupWhat KMP is, when to use it, and a guided setup with the K2 compiler.
What is Kotlin Multiplatform? (when to choose it)
video • 10 min
Create a KMP Project: Gradle plugin, K2 compiler, targets
video • 12 min
Android Studio/IntelliJ tips (wizard, run configs, Swift basics in IDE)
article • 8 min
Practice: Generate a starter shared module and run Android + iOS
exercise • 40 min
2
Source Sets & Default Target HierarchyOrganize common and platform code using the modern hierarchy.
commonMain, androidMain, iosMain — how the pieces fit
video • 11 min
Dependencies & resources across source sets
video • 10 min
Build logic & Gradle basics for multiplatform
article • 9 min
Practice: Move platform calls behind interfaces in commonMain
exercise • 35 min
3
expect/actual APIsDesign platform bridges you can unit-test from common code.
expect/actual 101: signatures, packaging, and naming
video • 12 min
Designing platform services (time, network reachability, logging)
video • 10 min
Pitfalls: leakage of platform types into common code
article • 8 min
Practice: Implement a Reachability service with expect/actual
exercise • 40 min
4
Concurrency & Memory on Kotlin/NativeModern memory manager, threads, and coroutine notes on iOS/Native.
Modern memory manager & shared heap (no freezing model)
video • 12 min
Coroutines on Native: dispatchers & main-safety on iOS
video • 10 min
Practice: Concurrent tasks + safe cleanup on iOS
exercise • 30 min
5
Networking & Serialization (Shared Data Layer)Ktor HTTP client + kotlinx.serialization across platforms.
Ktor Client setup for Android & iOS (engines, timeouts)
video • 12 min
kotlinx.serialization: JSON config, polymorphism, defaults
video • 12 min
Error mapping & retries (HTTP → domain)
article • 10 min
Practice: Shared API client + model serialization
exercise • 50 min
6
Storage & CachingKey–value, files, and SQL options; cache & invalidation patterns.
Key–value & files (multiplatform-friendly approaches)
video • 11 min
SQL options in KMP (overview) and repository patterns
video • 11 min
Cache policies: stale-while-revalidate, TTL, manual invalidation
article • 9 min
Practice: Offline-first cache backed by shared storage
exercise • 45 min
7
Architecture & DI (KMP-friendly)Interface-driven design, constructor injection, module boundaries.
Module boundaries & feature splits in KMP
video • 10 min
DI without frameworks (constructor injection, factories, service locators)
video • 10 min
Practice: Wire a shared use-case layer for Android & iOS
exercise • 35 min
8
Compose Multiplatform (Optional Shared UI)Share UI with Compose where it fits; interop with native UIs.
Compose Multiplatform basics (Android/iOS/Desktop/Web preview)
video • 12 min
State, navigation, and platform interop (UIKit/SwiftUI bridge, Views)
video • 12 min
Resources & theming notes
article • 9 min
Practice: Shared screen rendered on Android & iOS
exercise • 50 min
9
iOS Integration & PublishingCocoaPods & Swift Package export; XCFrameworks; interop tips.
CocoaPods Gradle plugin (Pods as deps / publish as Pod)
video • 12 min
Swift Package export (SPM) from Gradle
video • 11 min
XCFrameworks, Swift/Obj-C interop, and versioning
article • 9 min
Practice: Integrate the shared library into a Swift app
exercise • 45 min
10
Testing & CI for KMPcommonTest, iosTest, and CI pipelines for multi-target builds.
kotlin.test in common & platform tests; mocking strategies
video • 12 min
Running iOS tests from Android Studio; device/simulator tips
video • 10 min
CI setup: Gradle tasks, caching, matrix builds (Android+iOS)
article • 10 min
Practice: Add tests & a basic CI workflow to the repo
exercise • 40 min
11
Build, Release & Platform NotesPackaging, version catalogs, and platform caveats (JS/Wasm).
Publishing libraries (Maven, framework artifacts)
video • 10 min
Version catalogs & dependency management for KMP
video • 10 min
JS & Wasm notes (status, when to target them)
article • 9 min
12
Capstone: Shared Business LogicPut it all together: one shared module powering two apps.
Design: shared data layer + expect/actual platform services
video • 12 min
Implement & wire Android + iOS (UI of your choice)
video • 12 min
Practice: Ship a minimal feature end-to-end (API, cache, tests, CI)
exercise • 90 min