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

Kotlin 2.0が与えるAndroid開発の進化

Kotlin 2.0が与えるAndroid開発の進化

DroidKaigi 2024で発表させていただくslideです。

Masayuki Suda

September 11, 2024
Tweet

More Decks by Masayuki Suda

Other Decks in Programming

Transcript

  1. ໨࣍ 01. ΠϯτϩμΫγϣϯ 04. Stabilized Features 05. Test Experimence 02.

    Kotlin 2.0 migration 03. K2Compiler 06. Jetpack Compose 1.1 ࣗݾ঺հ 1.2 kotlin2.0 overview 4.1 Enum entries Stable 4.2 Auto Closeable 5.1 Power Assert 2.1 kotlin2.0΁ͷmigrationํ๏ 2.2 kapt͔Βksp΁ͷҠߦํ๏ 3.1 ֓ཁ 3.2 Smart Castͷվળ 3.3 BackingFieldsͷਐԽ 6.1 Strong Skip Mode
  2. Kotlin 2.0΁ͷmigration ɾBump up 2.0 ɾ.gitignore ͷߋ৽ ɾComposeͷߋ৽ ɾKotlin Optionͷߋ৽

    ɾAndroid Studio K2 Compilerͷ༗ޮԽ ɾkapt͔Βksp΁ͷҠߦ Kotlin 2.0΁ͷmigration
  3. Kotlin 2.0΁ͷmigration Enable K2 Kotlin Mode In IntelliJ IDEA 2024.1ͰରԠࡁΈɹྫ

    ɾCode highlighting & Code completion. ɾNavigation ɾBasic refactorings ɾDebugging
  4. Kotlin 2.0΁ͷmigration Enable K2 Kotlin Mode In IntelliJ IDEA 2024.1ͰະରԠɹྫ

    ɾAndroid Project ɾKotlin Multiplatform projects ɾJava-to-Kotlin conversion ɾCode analysis in .gradle.kts files
  5. Jetpack Compose Strong Skip Mode Row item1 item2 item3 item1Λߋ৽

    Row item1 item2 item3 Recompose Recompose Skip Skip Recomposeͱ͸ ɾUIͷҰ෦͕ঢ়ଶͷมԽʹԠͯ͡࠶ඳը͞ΕΔϓϩηε
  6. Jetpack Compose Strong Skip Mode UnstableͳҾ਺Λitem2, 3͕࢖͍ͬͯΔͱ ঢ়ଶ͕มߋ͍ͯ͠ͳͯ͘΋࠶ඳը͕͞Εͯ͠·͏ Row item1

    item2 item3 item1Λߋ৽ Row item1 item2 item3 Recompose Recompose Recompose Recompose
  7. Jetpack Compose Strong Skip Mode Object equalsͱinstance equals ɾStrong Skip

    Mode͕ಋೖ͞ΕΔͱύϑΥʔϚϯεͰ೰ Ή͜ͱࣗମ͕ݮΔՄೳੑ͕ߴ͍ ɾObject equalsͱinstance equals͔Ͱ೰Ή͜ͱ͕૿͑Δ ͔΋ʁ
  8. Jetpack Compose Strong Skip Mode Object equalsͱinstance equals ɾObject equals͸O(n)ʹରͯ͠instance

    equals͸O(1) ɾ݅਺ͷଟ͍͍ෳࡶͳlist౳Λ๊͍͑ͯΔ৔߹͸ instance equalsͷํ͕ѹ౗తʹ଎͍
  9. Special Thanks KotlinެࣜϦϑΝϨϯε https://kotlinlang.org/docs/collections-overview.html Jetpack Compose: Strong Skipping Mode Explained

    https://medium.com/androiddevelopers/jetpack-compose-strong-skipping-mode-explained-cbdb2aa4b900 Jetpack Compose Stability Explained https://medium.com/androiddevelopers/jetpack-compose-stability-explained-79c10db270c8 New ways of optimizing stability in Jetpack Compose https://medium.com/androiddevelopers/new-ways-of-optimizing-stability-in-jetpack-compose-038106c283cc