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

Build your knowledge, step by step.

44 lessons across 12 modules. Lessons marked “Coming soon” aren’t available yet.

01MODULE 01KMP Overview & Project Setup4 lessons · Self-paced

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

  1. 01What is Kotlin Multiplatform? (when to choose it)Coming soon
  2. 02Create a KMP Project: Gradle plugin, K2 compiler, targetsComing soon
  3. 03Android Studio/IntelliJ tips (wizard, run configs, Swift basics in IDE)Coming soon
  4. 04Practice: Generate a starter shared module and run Android + iOSComing soon
02MODULE 02Source Sets & Default Target Hierarchy4 lessons · Self-paced

Organize common and platform code using the modern hierarchy.

  1. 01commonMain, androidMain, iosMain — how the pieces fitComing soon
  2. 02Dependencies & resources across source setsComing soon
  3. 03Build logic & Gradle basics for multiplatformComing soon
  4. 04Practice: Move platform calls behind interfaces in commonMainComing soon
03MODULE 03expect/actual APIs4 lessons · Self-paced

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

  1. 01expect/actual 101: signatures, packaging, and namingComing soon
  2. 02Designing platform services (time, network reachability, logging)Coming soon
  3. 03Pitfalls: leakage of platform types into common codeComing soon
  4. 04Practice: Implement a Reachability service with expect/actualComing soon
04MODULE 04Concurrency & Memory on Kotlin/Native3 lessons · Self-paced

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

  1. 01Modern memory manager & shared heap (no freezing model)Coming soon
  2. 02Coroutines on Native: dispatchers & main-safety on iOSComing soon
  3. 03Practice: Concurrent tasks + safe cleanup on iOSComing soon
05MODULE 05Networking & Serialization (Shared Data Layer)4 lessons · Self-paced

Ktor HTTP client + kotlinx.serialization across platforms.

  1. 01Ktor Client setup for Android & iOS (engines, timeouts)Coming soon
  2. 02kotlinx.serialization: JSON config, polymorphism, defaultsComing soon
  3. 03Error mapping & retries (HTTP → domain)Coming soon
  4. 04Practice: Shared API client + model serializationComing soon
06MODULE 06Storage & Caching4 lessons · Self-paced

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

  1. 01Key–value & files (multiplatform-friendly approaches)Coming soon
  2. 02SQL options in KMP (overview) and repository patternsComing soon
  3. 03Cache policies: stale-while-revalidate, TTL, manual invalidationComing soon
  4. 04Practice: Offline-first cache backed by shared storageComing soon
07MODULE 07Architecture & DI (KMP-friendly)3 lessons · Self-paced

Interface-driven design, constructor injection, module boundaries.

  1. 01Module boundaries & feature splits in KMPComing soon
  2. 02DI without frameworks (constructor injection, factories, service locators)Coming soon
  3. 03Practice: Wire a shared use-case layer for Android & iOSComing soon
08MODULE 08Compose Multiplatform (Optional Shared UI)4 lessons · Self-paced

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

  1. 01Compose Multiplatform basics (Android/iOS/Desktop/Web preview)Coming soon
  2. 02State, navigation, and platform interop (UIKit/SwiftUI bridge, Views)Coming soon
  3. 03Resources & theming notesComing soon
  4. 04Practice: Shared screen rendered on Android & iOSComing soon
09MODULE 09iOS Integration & Publishing4 lessons · Self-paced

CocoaPods & Swift Package export; XCFrameworks; interop tips.

  1. 01CocoaPods Gradle plugin (Pods as deps / publish as Pod)Coming soon
  2. 02Swift Package export (SPM) from GradleComing soon
  3. 03XCFrameworks, Swift/Obj-C interop, and versioningComing soon
  4. 04Practice: Integrate the shared library into a Swift appComing soon
10MODULE 10Testing & CI for KMP4 lessons · Self-paced

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

  1. 01kotlin.test in common & platform tests; mocking strategiesComing soon
  2. 02Running iOS tests from Android Studio; device/simulator tipsComing soon
  3. 03CI setup: Gradle tasks, caching, matrix builds (Android+iOS)Coming soon
  4. 04Practice: Add tests & a basic CI workflow to the repoComing soon
11MODULE 11Build, Release & Platform Notes3 lessons · Self-paced

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

  1. 01Publishing libraries (Maven, framework artifacts)Coming soon
  2. 02Version catalogs & dependency management for KMPComing soon
  3. 03JS & Wasm notes (status, when to target them)Coming soon
12MODULE 12Capstone: Shared Business Logic3 lessons · Self-paced

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

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