Marco Gomiero

Introducing Kotlin Multiplatform in an existing project

What's the safest way to add Kotlin Multiplatform to an existing app? Start by sharing the small, boring code you have to write twice.

Introducing Kotlin Multiplatform in an existing project
#1about 3 minutes

Understanding the core principles of Kotlin Multiplatform

Kotlin Multiplatform enables sharing non-UI business logic across platforms like Android and iOS by compiling Kotlin to native code.

#2about 6 minutes

Setting up a new project with the monorepo structure

The Android Studio plugin simplifies new project setup by creating a monorepo with shared modules consumed differently by Android and iOS.

#3about 4 minutes

Choosing what code to share in an existing project

Start sharing code that is a single source of truth or is tedious to write twice, such as DTOs, common models, or analytics.

#4about 4 minutes

Publishing a shared Android library using Maven

Use the Maven Publish Gradle plugin to package the shared code as an AAR library and publish it to a repository for Android consumption.

#5about 10 minutes

Building and publishing an XCframework for iOS

Create a universal XCframework containing all necessary architectures and publish it to a private Cocoapods repository for use in an iOS project.

#6about 4 minutes

Managing concurrency and memory in Kotlin Native

The original Kotlin Native memory model requires freezing objects to share them across threads, but a new, more flexible memory model is coming.

#7about 4 minutes

A practical strategy for adopting Kotlin Multiplatform

Begin by sharing a small, low-risk feature to validate the entire deployment pipeline before expanding to more complex business logic.

#8about 12 minutes

Q&A on limitations, challenges, and testing

The main challenges are the initial setup and concurrency model, while UI testing remains platform-specific and team collaboration is key for success.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.