Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Understanding Kotlin Multiplatform (Busan)

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
HyunWoo Lee
September 07, 2025

Understanding Kotlin Multiplatform (Busan)

Google I/O Extended Busan 2025에서 진행한 Understanding Kotlin Multiplatform의 Speaker Deck입니다.

HyunWoo Lee

September 07, 2025

Transcript

47 slides
  1. 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
  2. Google I/O Extended 25 Google Docs Google Docsח iOS ജ҃ীࢲ

    KMPܳ ഝਊೞҊ ੓णפ׮. ӝઓ ௏٘৬ ࠺Ү೮ਸ ٸ ࢿמ ର੉о ௼ѱ ա૑ ঋҊ য়൤۰ ੉੹ࠁ׮ ؊ જ਷ ҃਋ب ੓णפ׮.
  3. Google I/O Extended 25 উ٘۽੉٘ ௏٘о ੘ࢿػ ࢚ടীࢲ ࡅܰѱ iOSীب

    ੸ਊೞӝ ਤ೧ ࠺ૉפझ ۽૒ਸ ҕਬೡ ࣻ ੓ח KMPܳ ଻ఖ೮णפ׮. Duolingo
  4. Google I/O Extended 25 Advantage of KMP ֎੉౭࠳ ӝמਸ ࢿמ

    ੷ೞ হ੉ Ӓ؀۽ Virtual Machine ҅க੉ হয ੘ࢿػ ௏٘о ೒ۖಬ੄ ֎੉౭࠳ ௏٘۽ ஹ౵ੌؾפ׮. ੼૓੸ੋ ௏٘ ݃੉Ӓۨ੉࣌੉ оמ ֎੉౭࠳ ௏٘۽ ஹ౵ੌ غӝী ӝઓ ௏٘ب ഝਊೡ ࣻ ੓Ҋ ੉ܳ ഝਊ೧ࢲ ࠗ࠙ ੸ਊ, ੼૓੸ ੸ਊ੉ оמ೤פ׮. ௏٘ ੤ࢎਊࢿҗ ࢎਊ੗ ҃೷੄ ੌҙࢿ زੌೠ ௏٘߬੉झܳ ৈ۞ ೒ۖಬী ҕਬо оמೞৈ ௏٘ ੤ࢎਊࢿਸ ֫ੌ ࣻ ੓Ҋ ੉ী ٮۄ ೒ۖಬী ޖҙೞѱ زੌೠ ҃೷ਸ ઁҕೡ ࣻ ੓णפ׮.
  5. Google I/O Extended 25 01 ࢎਊ੗ীѱ “જ਷” ҃೷ਸ ઁҕ೧઴ ࣻ

    ੓যঠೠ׮. 02 ೐ۨ੐ਕ௼ܳ ഝਊೠ জٜ੉ द੢ীࢲ જ਷ Ѿҗܳ ࠁৈ઻ঠ ೠ׮ 03 ೧׼ ӝࣿਸ ӝ߈ਵ۽ ࢿҕ੸ੋ ழܻযܳ ऺ਷ ੹ޙоٜ੉ ੓যঠೠ׮. Good Framework? KMPח ֎੉౭࠳ জٜҗ زੌೠ ࢿמਵ۽ ӝמਸ ҳഅೡ ࣻ ੓਺ ௏٘߬੉झܳ ҕਬೞҊ ѐߊ दрਸ ױ୷ೞৈ द੢ী ࡅܰҊ উ੿੸ਵ۽ ઁಿਸ ࢶࠁੌ ࣻ ੓਺ ӝઓ Kotlin, Android ੹ޙоٜਸ ഝਊೡ ࣻ ੓਺
  6. ӒܻҊ 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) } } }
  7. ೐۽ં౟ ௏٘ܳ ஹ౵ੌೡ ؀࢚ ఋѶਸ ࢶ঱ ࣗझ ௏٘ܳ ೒ۖಬ р

    ҕਬೡ ࣻ ੓ب۾ ҳࢿ Kotlin Multiplatform ೐۽ં౟ ҳࢿ
  8. • যڃ ೒ۖಬ੄ ই౭ಂ౟ܳ ࢤࢿೡ Ѫੋ૑ ੿ ੄ೞח Ѫ •

    ੐੄۽ ੉ܴਸ ࠢੌ ࣻب ੓Ҋ ೒ۖಬ ߹۽ ৈ ۞ѐ੄ ఋӥਸ ૑੿ೡ ࣻ ੓਺ Targets
  9. plugins { … } kotlin { androidLibrary { namespace =

    “io.google.extended.busan” compileSdk = 35 } iosX64 { … } }
  10. • ஹ౵ੌ җ੿ীࢲ ୊ܻغח Kotlin ࣗझ ౵ੌ, ੄ઓࢿ, ܻࣗझ ҙ۲

    ੿ࠁٜਸ ੿੄ೞח ҕр • ׮ܲ Source Setী ੄ઓ ҙ҅ܳ ࢸ੿೧ ௏٘ ܳ ҕਬೡ ࣻ ੓Ҋ ೙ਃೠ ҃਋ ੐੄੄ ழझథ ࣗझࣇਸ ੿੄ೡ ࣻ ੓਺ Source Sets
  11. 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) } } }
  12. kotlin { sourceSets { commonMain.dependencies { … } wasmJsMain {

    dependencies { implementation(libs.kotlinx.immutable) } } val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain { dependsOn(nonWasmJsMain) } desktopMain { dependsOn(nonWasmJsMain) }
  13. } val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain {

    dependsOn(nonWasmJsMain) } desktopMain { dependsOn(nonWasmJsMain) } androidMain { dependsOn(nonWasmJsMain) } } }
  14. val nonWasmJsMain by creating { dependsOn(commonMain.get()) } appleMain { dependsOn(nonWasmJsMain)

    } desktopMain { dependsOn(nonWasmJsMain) } androidMain { dependsOn(nonWasmJsMain) }
  15. Google I/O Extended 25 • ݽٕ ղীࢲ ࢶ঱ػ ݽٚ ݽٕীࢲ

    ࢎਊغח ҕా ௏٘ܳ ੘ࢿೞח ࣗझࣇੑפ׮. • ࢶ঱ػ ೒ۖಬী ஹ౵ੌ ؼ ࣻ ੓ח ௏٘ܳ ੘ࢿೡ ࣻ݅ ੓ਵݶ commonMainীࢲ ੘ࢿೡ ࣻ ੓णפ׮. • ݽٕী androidTarget, jvm݅ ࢸ੿೮׮ݶ, commonMainীࢲب jvm ఋѶ ௏٘ܳ ੘ࢿೡ ࣻ ੓णפ׮. What is “common”? Common਷ ఋѶب, ೒ۖಬب ইתפ׮.
  16. 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
  17. plugins { … } kotlin { // androidLibrary { …

    } iosX64 { binaries { framework { baseName = “NunuFramework” } } } build.gradle
  18. Google I/O Extended 25 • ѐߊ઺ੌ ٸח ࠽٘ दী ѐߊ઺ੋ

    Shared Module(KMP Module)੄ ࠽٘ Ѿҗޛਸ জী ನೣೠ׮ • ߓನܳ ೡ ٸীח Gradleীࢲ ۄ੉࠳۞ܻܳ ࢎਊೞח Ѫ୊ۢ Cocoapods, Swift Package Managerীࢲ ׮਍߉ਸ ࣻ ੓ب۾ ৻ࠗ ࢲߡী ೐ۨ੐ਕ௼ܳ ߓನ/ࢸ੿ೠ׮. ৈӝࢲ ՘ੌө? ઁ੘݅ ೧֬ও૑ iOS জী ֍૑ ঋও׮.
  19. Google I/O Extended 25 Swift Package Manager • Appleীࢲ ӂ੢ೞח

    Binary package ߓನ ҙܻ ߑध • അ੤ iOS ࢤక҅੄ Best Practice Apple੄ ҕध੸ੋ Package Manager
  20. Google I/O Extended 25 Swift Package Manager • ./gradlew <your_shared>:assembleXCFramework

    • XCFrameworkܳ .zipਵ۽ ݅׮ • Github Release৬ э਷ ܻݽ౟ ജ҃ী ৢ۰֬ח׮ • Package.swift ౵ੌਸ ੘ࢿೠ׮ • ৻ࠗ ۨನ૑ఠܻী Package.swift ౵ੌਸ ޻য֍ח׮ How to deploy “framework”?
  21. Google I/O Extended 25 CocoaPods • ੉޷ iOS ѐߊ੗ٜ੉ SPM੉

    ইצ CocoaPodsਸ ࢎਊೞҊ ੓׮ݶ ଻ఖ оמ • Gradle DSL۽ب ۄ੉࠳۞ܻ ߓನо оמೣ ੉ઁח ҳध੉ ػ ࢲ٘౵౭ ಁః૑ ݒפ੷
  22. Google I/O Extended 25 CodeLab - Get Started with Kotlin

    Multiplatform CodeLab - Migrate existing apps to Room KMP
  23. Thank You HyunWoo Lee Android/React Native Engineer, Viva Republica(Toss) Organizer,

    GDG Korea Android/Kotlin User Groups Seoul Kotlin Multiplatform: Theory and Practice

More Decks by HyunWoo Lee

Other Decks in Programming