Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Understanding Kotlin Multiplatform
Search
HyunWoo Lee
July 26, 2025
Programming
0
110
Understanding Kotlin Multiplatform
Google I/O Extended Incheon 2025에서 진행한 Understanding Kotlin Multiplatform의 Speaker Deck입니다.
HyunWoo Lee
July 26, 2025
Tweet
Share
More Decks by HyunWoo Lee
See All by HyunWoo Lee
파급효과: From AI to Android Development
l2hyunwoo
0
210
선언형 UI에서의 상태관리
l2hyunwoo
0
490
선언형 UI를 학습할 때 알아둬야하는 키워드들
l2hyunwoo
0
410
Essential concepts to know when learning Declarative UI
l2hyunwoo
2
1.3k
React Native under the hood
l2hyunwoo
0
110
유연한 Composable 설계
l2hyunwoo
0
670
KotlinConf 2024 Global in South Korea Keynote
l2hyunwoo
0
120
TextField 씹고 뜯고 맛보고 즐기고
l2hyunwoo
0
430
CDG로 모두와 함께 성장하기
l2hyunwoo
0
190
Other Decks in Programming
See All in Programming
AIコーディングエージェント全社導入とセキュリティ対策
hikaruegashira
12
7.2k
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
120
PHPUnitの限界をPlaywrightで補完するテストアプローチ
yuzneri
0
270
AIともっと楽するE2Eテスト
myohei
9
3.1k
構造化・自動化・ガードレール - Vibe Coding実践記 -
tonegawa07
0
150
202507_ADKで始めるエージェント開発の基本 〜デモを通じて紹介〜(奥田りさ)
risatube
PRO
3
550
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.4k
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
110
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
1
220
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
690
状態遷移図を書こう / Sequence Chart vs State Diagram
orgachem
PRO
3
250
「次に何を学べばいいか分からない」あなたへ──若手エンジニアのための学習地図
panda_program
3
640
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
It's Worth the Effort
3n
185
28k
Scaling GitHub
holman
461
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
850
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Automating Front-end Workflow
addyosmani
1370
200k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
The Invisible Side of Design
smashingmag
301
51k
Transcript
Understanding Kotlin Multiplatform HyunWoo Lee Android/React Native Engineer, Viva Republica(Toss)
Organizer, GDG Korea Android/Kotlin User Groups Seoul Kotlin Multiplatform: Theory and Practice
2023.12 GDG Devfest Incheon
Kotlin Multiplatform
Kotlin Multiplatform Is it stable?
Kotlin Multiplatform Is it widely used?
Kotlin Multiplatform
Google I/O Extended 25 Google Docs Google Docsח iOS ജ҃ীࢲ
KMPܳ ഝਊೞҊ णפ. ӝઓ ٘৬ ࠺Ү೮ਸ ٸ ࢿמ ରо ѱ ա ঋҊ য়۰ ࠁ ؊ જ ҃ب णפ.
Google I/O Extended 25 Juliana Chahoud ൞ח 55% о ٘ܳ
KMPܳ ഝਊೞৈ ҕਬೞҊ णפ. ؋࠙ী ӝמ ѐߊਸ ೡ ٸ ড 40% ب ࡈۄ Ѫ эणפ. Sr Director of Engineering, StoneCo
Google I/O Extended 25 উ٘۽٘ ٘о ࢿػ ࢚ടীࢲ ࡅܰѱ iOSীب
ਊೞӝ ਤ೧ ࠺ૉפझ ۽ਸ ҕਬೡ ࣻ ח KMPܳ ఖ೮णפ. Duolingo
Google I/O Extended 25 Advantage of KMP ֎౭࠳ ӝמਸ ࢿמ
ೞ হ Ӓ۽ Virtual Machine ҅க হয ࢿػ ٘о ۖಬ ֎౭࠳ ٘۽ ஹੌؾפ. ੋ ٘ ݃Ӓۨ࣌ оמ ֎౭࠳ ٘۽ ஹੌ غӝী ӝઓ ٘ب ഝਊೡ ࣻ Ҋ ܳ ഝਊ೧ࢲ ࠗ࠙ ਊ, ਊ оמפ. ٘ ࢎਊࢿҗ ࢎਊ ҃ ੌҙࢿ زੌೠ ٘߬झܳ ৈ۞ ۖಬী ҕਬо оמೞৈ ٘ ࢎਊࢿਸ ֫ੌ ࣻ Ҋ ী ٮۄ ۖಬী ޖҙೞѱ زੌೠ ҃ਸ ઁҕೡ ࣻ णפ.
Kotlin Multiplatform X Android Team
Google I/O Extended 25 01 ࢎਊীѱ “જ” ҃ਸ ઁҕ೧ ࣻ
যঠೠ. 02 ۨਕܳ ഝਊೠ জٜ दীࢲ જ Ѿҗܳ ࠁৈঠ ೠ 03 ೧ ӝࣿਸ ӝ߈ਵ۽ ࢿҕੋ ழܻযܳ ऺ ޙоٜ যঠೠ. Good Framework? KMPח ֎౭࠳ জٜҗ زੌೠ ࢿמਵ۽ ӝמਸ ҳഅೡ ࣻ ٘߬झܳ ҕਬೞҊ ѐߊ दрਸ ױ୷ೞৈ दী ࡅܰҊ উਵ۽ ઁಿਸ ࢶࠁੌ ࣻ ӝઓ Kotlin, Android ޙоٜਸ ഝਊೡ ࣻ
Google I/O Extended 25 Android Jetpack for KMP
Google I/O Extended 25 Jetpack KMPച? 800+ Jetpack ݽٕ іࣻ
• ݽٚ Jetpack ۄ࠳۞ܻܳ KMP ജदఃח Ѫ ࠺ബਯ. (Android ౠച ۄ࠳۞ܻب ઓ ೣ) • ݽٚ KMP ۄ࠳۞ܻٜਸ ݽٚ ۖಬী ਗೡ ࣻ ѱ সೞח Ѫب दрബਯ ঋ.
Google I/O Extended 25 Tier 1 Tier 2 Tier 3
• Android • JVM • iOS • macOS • Linux • watchOS • tvOS • Windows • WASM(Web)
Google I/O Extended 25 Tier 1 Tier 2 Tier 3
• CIীࢲ Unit Test, Device Test ࣻ೯ • ߡ ଼ী ٮۄࢲ Binary compatibility ېఊ • CIীࢲ Unit Test݅ ࣻ೯ • Binary Compatibility ࣻ೯ X • CI పझ ࣻ೯ X • Binary Compatibility ࣻ೯ X
Google I/O Extended 25 Stable Commonized Alpha • Binary Compatibility
ࠁ • 1 tier ۖಬীࢶ औѱ ాद ఆ ࣻ • Binary Compatibility ࠁ • ࣻز Integration • ৈ ѐߊ • APIٜ ߸҃ؼ ࣻ
Google I/O Extended 25 • Binary Compatibility ࠁ • ࣻز
Integration
Google I/O Extended 25 Toolchain Contributions
Google I/O Extended 25 System Lint Productivity • Kotlin/Native ஹੌ۞
ੋ LLVM 16ਵ۽ ೱ࢚ • ࢜۽ ޙৌ അ ҳഅ ߂ GC ࢿמ ೱ࢚ਵ۽ ۠ఋ ࢿמ ߂ ݫݽܻ ࢎਊ ѐࢶ • KMP ٘ ࠙ࢳਸ ਤ೧ Kotlin ఋѶ ࢚ਵ۽ Android Lint ਗ • Binary compatibility tracking • AGP(Android Gradle Plugin) & KGP(Kotlin Gradle Plugin) API ా
Kotlin Multiplatform మ݁ ୭नച Android Studio
Kotlin Multiplatform మ݁ ୭नച Android Studio
Kotlin Multiplatform Shared Module మ݁ ୶о Android Studio
ӒܻҊ Gradle ٘ܳ झਸ਼ ࠁݶ Target? sourceSet? binaries? framework? kotlin
{ targets .filterIsInstance<KotlinNativeTarget>() .forEach { target -> target.binaries { framework { baseName = "Snup" isStatic = true } } } sourceSets { androidMain.dependencies { implementation(compose.preview) implementation(libs.androidx.activity.compose) } commonMain.dependencies { implementation(projects.feature.preview) implementation(libs.androidx.lifecycle.viewmodel) implementation(libs.androidx.lifecycle.runtimeCompose) implementation(libs.androidx.navigation.compose) implementation(libs.kotlinx.serialization.json) } commonTest.dependencies { implementation(libs.kotlin.test) } } }
Understanding Kotlin Multiplatform Project
ӝࠄਵ۽ • App Module • ৈ۞ѐ subproject(Library Module) ۽ ҳࢿؽ
Android ۽ં ҳࢿ
۽ં ٘ܳ ஹੌೡ ࢚ ఋѶਸ ࢶ ࣗझ ٘ܳ ۖಬ р
ҕਬೡ ࣻ ب۾ ҳࢿ Kotlin Multiplatform ۽ં ҳࢿ
build.gradle plugins { id(“org.jetbrains.kotlin”) id(“com.android.library”) } android { … }
kotlin { … }
build.gradle plugins { id(“org.jetbrains.kotlin.multiplatform”) id(“com.android.kotlin.multiplatform.library”) } kotlin { … }
public fun org.gradle.api.Project.kotlin( configure: org.gradle.api.Action<org.jetbrains.kotlin.gradle.dsl .KotlinAndroidProjectExtension> ): kotlin.Unit { /*
compiled code */ }
public fun org.gradle.api.Project.kotlin( configure: org.gradle.api.Action<org.jetbrains.kotlin.gradle.dsl .KotlinMultiplatformExtension> ): kotlin.Unit { /*
compiled code */ }
• যڃ ۖಬ ই౭ಂܳ ࢤࢿೡ Ѫੋ ೞח Ѫ •
۽ ܴਸ ࠢੌ ࣻب Ҋ ۖಬ ߹۽ ৈ ۞ѐ ఋӥਸ ೡ ࣻ Targets
• Kotlin Toolchainীࢲ ؽ • ٘о جইоח पੋ ജ҃ਸ
• example) iOSSimulatorArm64 Platform
plugins { … } android { namespace = “io.google.extended.incheon” compileSdk
= 35 // … } kotlin { … }
plugins { … } kotlin { androidLibrary { namespace =
“io.google.extended.incheon” compileSdk = 35 } iosX64 { … } }
Google I/O Extended 25 https://www.jetbrains.com/help/kotlin-multiplatform-dev/ multiplatform-hierarchy.html#manual-configuration
• ஹੌ җীࢲ ܻغח Kotlin ࣗझ ੌ, ઓࢿ, ܻࣗझ ҙ۲
ࠁٜਸ ೞח ҕр • ܲ Source Setী ઓ ҙ҅ܳ ࢸ೧ ٘ ܳ ҕਬೡ ࣻ Ҋ ਃೠ ҃ ழझథ ࣗझࣇਸ ೡ ࣻ Source Sets
kotlin { sourceSets { commonMain.dependencies { … } wasmJsMain {
dependencies { implementation(libs.kotlinx.immutable) } } val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain { dependsOn(nonWasmJsMain) } desktopMain { dependsOn(nonWasmJsMain) } androidMain { dependsOn(nonWasmJsMain) } } }
kotlin { sourceSets { commonMain.dependencies { … } wasmJsMain {
dependencies { implementation(libs.kotlinx.immutable) } } val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain { dependsOn(nonWasmJsMain) } desktopMain { dependsOn(nonWasmJsMain) }
} val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain {
dependsOn(nonWasmJsMain) } desktopMain { dependsOn(nonWasmJsMain) } androidMain { dependsOn(nonWasmJsMain) } } }
val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain { dependsOn(nonWasmJsMain)
} desktopMain { dependsOn(nonWasmJsMain) } androidMain { dependsOn(nonWasmJsMain) }
Google I/O Extended 25 • ݽٕ ղীࢲ ࢶػ ݽٚ ݽٕীࢲ
ࢎਊغח ҕా ٘ܳ ࢿೞח ࣗझࣇੑפ. • ࢶػ ۖಬী ஹੌ ؼ ࣻ ח ٘ܳ ࢿೡ ࣻ݅ ਵݶ commonMainীࢲ ࢿೡ ࣻ णפ. • ݽٕী androidTarget, jvm݅ ࢸ೮ݶ, commonMainীࢲب jvm ఋѶ ٘ܳ ࢿೡ ࣻ णפ. What is “common”? Common ఋѶب, ۖಬب ইתפ.
Understanding Kotlin Multiplatform Publishing
Google I/O Extended 25 JAR/AAR • JVM & Android ࢚
• ӝઓҗ زੌೠ ߑध • Gradleীࢲ ࢎਊೣ Klib • JVM & Android ઁ৻ ఋѶ • Gradleীࢲ ࢎਊೣ XCFramework • iOS ਊ Binary format • Cocoapods/SPM(Swift Package Manager) ഝਊ ೞৈ ࢎਊೡ ࣻ Binary formats
plugins { id(“maven-publish”) } group = “io.google.extended.incheon” version = “1.0.0”
publishing { repositories { maven { … } } }
Understanding Kotlin Multiplatform Publishing - iOS
plugins { … } kotlin { // androidLibrary { …
} iosX64 { binaries { framework { baseName = “NunuFramework” } } } build.gradle
Google I/O Extended 25 • ѐߊੌ ٸח ࠽٘ दী ѐߊੋ
Shared Module(KMP Module) ࠽٘ Ѿҗޛਸ জী ನೣೠ • ߓನܳ ೡ ٸীח Gradleীࢲ ۄ࠳۞ܻܳ ࢎਊೞח Ѫۢ Cocoapods, Swift Package Managerীࢲ ߉ਸ ࣻ ب۾ ৻ࠗ ࢲߡী ۨਕܳ ߓನ/ࢸೠ. ৈӝࢲ ੌө? ઁ݅ ೧֬ও iOS জী ֍ ঋও.
cd ${PROJECT_DIR}/path/to/project ./gradlew \ :yourSharedModule:embedAndSignAppleFram eworkForXcode Local Integration
Google I/O Extended 25 Swift Package Manager • Appleীࢲ ӂೞח
Binary package ߓನ ҙܻ ߑध • അ iOS ࢤక҅ Best Practice Apple ҕधੋ Package Manager
Google I/O Extended 25 Swift Package Manager • ./gradlew <your_shared>:assembleXCFramework
• XCFrameworkܳ .zipਵ۽ ݅ • Github Release৬ э ܻݽ ജ҃ী ৢ۰֬ח • Package.swift ੌਸ ࢿೠ • ৻ࠗ ۨನఠܻী Package.swift ੌਸ য֍ח How to deploy “framework”?
import PackageDescription let package = Package( name: “Nunu”, platforms: [
.iOS(.v14), ], products: [ … ], targets: [ .binaryTarget(name: “Nunu”, url: “<XCFramework ZIP ੌ স۽٘ೠ ࣗ>”, // swift package compute-checksum NunuExmaple ݺ۸য प೯ checksum: “<प೯ػ Ѿҗޛਸ ৈӝী ੑ۱>” ] ) Package.swift
Swift Package Manager
Google I/O Extended 25 CocoaPods • iOS ѐߊٜ SPM
ইצ CocoaPodsਸ ࢎਊೞҊ ݶ ఖ оמ • Gradle DSL۽ب ۄ࠳۞ܻ ߓನо оמೣ ઁח ҳध ػ ࢲ٘౭ ಁః ݒפ
Google I/O Extended 25 CocoaPods • CocoaPodsܳ ࢸפ. • rvm
install ruby x.y.z sudo gem install -n /usr/local/bin cocoapods • Gradleী CocoaPods ߓನ ҙ۲ ࢸਸ ࢿפ. • ./gradlew :{shared_module}:podPublishXCFramework How to deploy “framework”?
plugins { id(“org.jetbrains.kotlin.native.cocoapods”) } cocoapods { specRepos { url(“{ߓನػ URL}”)
} pod(“dependency”) } build.gradle
Summary
Google I/O Extended 25 CodeLab - Get Started with Kotlin
Multiplatform CodeLab - Migrate existing apps to Room KMP
Google I/O Extended 25 ೞ߈ӝী Kotlin Multiplatform Compose Multiplatform Meetup
ਸ ҅ദੑפ. Kotlin User Groups
Thank You HyunWoo Lee Android/React Native Engineer, Viva Republica(Toss) Organizer,
GDG Korea Android/Kotlin User Groups Seoul Kotlin Multiplatform: Theory and Practice