androidengineers.Book a session

LEARN WITH A CLEAR DIRECTION

Kotlin Multiplatform (KMP)

Share business logic across Android, iOS, desktop, and web from a single Kotlin codebase.

IntermediateSelf-paced12 modules0 available lessons

Your path, one skill at a time.

Kotlin Multiplatform lets you reuse Kotlin code across Android, iOS, desktop, and web while keeping native UIs. This roadmap covers project setup with the K2 compiler, source sets and the default target hierarchy, expect/actual APIs, modern Kotlin/Native memory management, networking & serialization, storage, Compose Multiplatform (optional shared UI), iOS integration (CocoaPods/SPM), testing, and CI — everything you need to ship shared business logic in production.

What you’ll learn

  • 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

THE CURRICULUM

Everything you’ll learn, in order.

33 lessons and 11 labs across 12 modules. Lessons marked “Coming soon” aren’t available yet.

01KMP Overview & Project Setup3 lessons · 1 lab

What KMP is, when to use it, and a guided setup with the K2 compiler.

  1. VideoWhat is Kotlin Multiplatform? (when to choose it)Coming soon
  2. VideoCreate a KMP Project: Gradle plugin, K2 compiler, targetsComing soon
  3. LessonAndroid Studio/IntelliJ tips (wizard, run configs, Swift basics in IDE)Coming soon
  4. LabPractice: Generate a starter shared module and run Android + iOSComing soon
02Source Sets & Default Target Hierarchy3 lessons · 1 lab

Organize common and platform code using the modern hierarchy.

  1. VideocommonMain, androidMain, iosMain — how the pieces fitComing soon
  2. VideoDependencies & resources across source setsComing soon
  3. LessonBuild logic & Gradle basics for multiplatformComing soon
  4. LabPractice: Move platform calls behind interfaces in commonMainComing soon
03expect/actual APIs3 lessons · 1 lab

Design platform bridges you can unit-test from common code.

  1. Videoexpect/actual 101: signatures, packaging, and namingComing soon
  2. VideoDesigning platform services (time, network reachability, logging)Coming soon
  3. LessonPitfalls: leakage of platform types into common codeComing soon
  4. LabPractice: Implement a Reachability service with expect/actualComing soon
04Concurrency & Memory on Kotlin/Native2 lessons · 1 lab

Modern memory manager, threads, and coroutine notes on iOS/Native.

  1. VideoModern memory manager & shared heap (no freezing model)Coming soon
  2. VideoCoroutines on Native: dispatchers & main-safety on iOSComing soon
  3. LabPractice: Concurrent tasks + safe cleanup on iOSComing soon
05Networking & Serialization (Shared Data Layer)3 lessons · 1 lab

Ktor HTTP client + kotlinx.serialization across platforms.

  1. VideoKtor Client setup for Android & iOS (engines, timeouts)Coming soon
  2. Videokotlinx.serialization: JSON config, polymorphism, defaultsComing soon
  3. LessonError mapping & retries (HTTP → domain)Coming soon
  4. LabPractice: Shared API client + model serializationComing soon
06Storage & Caching3 lessons · 1 lab

Key–value, files, and SQL options; cache & invalidation patterns.

  1. VideoKey–value & files (multiplatform-friendly approaches)Coming soon
  2. VideoSQL options in KMP (overview) and repository patternsComing soon
  3. LessonCache policies: stale-while-revalidate, TTL, manual invalidationComing soon
  4. LabPractice: Offline-first cache backed by shared storageComing soon
07Architecture & DI (KMP-friendly)2 lessons · 1 lab

Interface-driven design, constructor injection, module boundaries.

  1. VideoModule boundaries & feature splits in KMPComing soon
  2. VideoDI without frameworks (constructor injection, factories, service locators)Coming soon
  3. LabPractice: Wire a shared use-case layer for Android & iOSComing soon
08Compose Multiplatform (Optional Shared UI)3 lessons · 1 lab

Share UI with Compose where it fits; interop with native UIs.

  1. VideoCompose Multiplatform basics (Android/iOS/Desktop/Web preview)Coming soon
  2. VideoState, navigation, and platform interop (UIKit/SwiftUI bridge, Views)Coming soon
  3. LessonResources & theming notesComing soon
  4. LabPractice: Shared screen rendered on Android & iOSComing soon
09iOS Integration & Publishing3 lessons · 1 lab

CocoaPods & Swift Package export; XCFrameworks; interop tips.

  1. VideoCocoaPods Gradle plugin (Pods as deps / publish as Pod)Coming soon
  2. VideoSwift Package export (SPM) from GradleComing soon
  3. LessonXCFrameworks, Swift/Obj-C interop, and versioningComing soon
  4. LabPractice: Integrate the shared library into a Swift appComing soon
10Testing & CI for KMP3 lessons · 1 lab

commonTest, iosTest, and CI pipelines for multi-target builds.

  1. Videokotlin.test in common & platform tests; mocking strategiesComing soon
  2. VideoRunning iOS tests from Android Studio; device/simulator tipsComing soon
  3. LessonCI setup: Gradle tasks, caching, matrix builds (Android+iOS)Coming soon
  4. LabPractice: Add tests & a basic CI workflow to the repoComing soon
11Build, Release & Platform Notes3 lessons

Packaging, version catalogs, and platform caveats (JS/Wasm).

  1. VideoPublishing libraries (Maven, framework artifacts)Coming soon
  2. VideoVersion catalogs & dependency management for KMPComing soon
  3. LessonJS & Wasm notes (status, when to target them)Coming soon
12Capstone: Shared Business Logic2 lessons · 1 lab

Put it all together: one shared module powering two apps.

  1. VideoDesign: shared data layer + expect/actual platform servicesComing soon
  2. VideoImplement & wire Android + iOS (UI of your choice)Coming soon
  3. LabPractice: Ship a minimal feature end-to-end (API, cache, tests, CI)Coming soon