Slide 1

Slide 1 text

YUMEMI.grow DroidKaigi.onCompletion { 2024@Online } 2024.09.25 Kotlin 2.0.20 ͔Β ඪ४ϥΠϒϥϦͰ UUID ͕ ࢖͑ΔΑ͏ʹͳΓ·ͨ͠ KAWASHIMA Yoshiyuki

Slide 2

Slide 2 text

఻͍͑ͨ͜ͱ • Kotlin 2.0.20 ͔Βඪ४ϥΠϒϥϦͰ UUID ͕࢖͑ΔΑ͏ʹ ͳͬͨ͜ͱ • UUID Λඪ४ϥΠϒϥϦʹ੾Γସ͑Δʹ͋ͨͬͯͷ஫ҙ఺ • ґଘؔ܎ͱͲ͏΍ͬͯ޲͖߹͍͔ͬͯ͘

Slide 3

Slide 3 text

ґଘؔ܎ͱͲ͏΍ͬͯ ޲͖߹͍ͬͯ·͔͢ʁ

Slide 4

Slide 4 text

ґଘؔ܎ • OS • ݴޠ • SDK • ϥΠϒϥϦ

Slide 5

Slide 5 text

ґଘؔ܎ͱͷ޲͖߹͍ํ • Dependabot Ͱि࣍Ͱߋ৽ • େ͖ͳมߋ͕͋ͬͨ࣌ʹ·ͱΊͯߋ৽ • ͳΔ΂͘ߋ৽͠ͳ͍ • ͦͷଞʢ͓͢͢Ίͷߋ৽ϑϩʔ΍πʔϧ͕͋Ε͹ੋඇ νϟοτཝʹʣ

Slide 6

Slide 6 text

dependabot ͔Βͷ PR • dependabot Ͱि࣍Ͱߋ৽ • Kotlin Multiplatform ΞϓϦέʔγϣϯ։ൃ • kotlinx-serialization-json 1.7.1 -> 1.7.2 https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.2

Slide 7

Slide 7 text

Ϛʔδͨ͠ΒΫϥογϡͨ͠ • Ϗϧυ͸ύε͢Δ͕ىಈͨ͠௚ޙʹΫϥογϡͨ͠ • kotlin.native.internal.IrLinkageError: Reference to class 'Uuid' can not be evaluated: No class found for symbol ‘kotlin.uuid/Uuid|null[0]'

Slide 8

Slide 8 text

kotlin.uuid/UUID?

Slide 9

Slide 9 text

ڞ௨ͷ Kotlin ඪ४ϥΠϒϥϦʹ͓͚Δ UUID ͷ αϙʔτ Kotlin 2.0.20 ͔Βಋೖ͞Ε·ͨ͠ https://kotlinlang.org/docs/whatsnew2020.html#standard-library

Slide 10

Slide 10 text

ϦϦʔεϊʔτΛվΊͯݟΔͱ Kotlin 2.0.20 ͕σϑΥϧτʹͳͬͯͨ https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.2

Slide 11

Slide 11 text

͞ΒʹϦϦʔεϊʔτΛεΫϩʔϧ͢Δͱɺ kotlin.uuid.Uuid ʹରԠͯͨ͠ https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.2

Slide 12

Slide 12 text

͜Ε·ͰͲ͏͍͔ͯͨ͠ • Java ͷ UUID Ϋϥε͔͠ͳ͔ͬͨ • JVM ϓϥοτϑΥʔϜͰ͋Ε͹໰୊ͳ͍ • Kotlin Multiplatform Ͱ͸ Java ͷϥΠϒϥϦΛར༻Ͱ͖ͳ ͍ • Kotlin Multiplatform ରԠͷαʔυύʔςΟͷ UUID ϥΠϒ ϥϦΛར༻͍ͯͨ͠

Slide 13

Slide 13 text

Ϋϥογϡαϯϓϧίʔυ • https://github.com/ykws/uuid- runtime-exception-sample

Slide 14

Slide 14 text

Json.encodeToString Ͱ αʔυύʔςΟͷ Uuid Λ Serialize ͢Δ෦෼ͰΫϥογϡ͠·͢

Slide 15

Slide 15 text

ΫϥογϡͷݪҼ • kotlinx-serialization-json 1.7.2 Ҏ߱ɺඪ४ϥΠϒϥϦͷ kotlin.uuid ʹґଘ͍ͯ͠Δ • αʔυύʔςΟͷ uuid Λ࢖༻͍ͯͨͨ͠Ίɺ kotlinx- serialization-json ଆͰ kotlin.uuid/Uuid ͷΫϥεղܾ͕Ͱ ͖ͳ͔ͬͨ

Slide 16

Slide 16 text

ճආ͢Δʹ͸ • kotlinx-serialization-json 1.7.1 Λ࢖༻͠ଓ͚Δ • αʔυύʔςΟͷ UUID Λඪ४ϥΠϒϥϦʹ੾Γସ͑Δ

Slide 17

Slide 17 text

ؒ઀తʹར༻͍ͯ͠Δέʔε • KableʢKotlin Asynchronous Bluetooth Low Energy) Ͱ͸ αʔυύʔςΟͷ UUID ϥΠϒϥϦʹґଘ͍ͯ͠Δ https://github.com/JuulLabs/kable • 0.36.0 ͷϚΠϧετʔϯͰରԠ༧ఆ https://github.com/ JuulLabs/kable/pull/758

Slide 18

Slide 18 text

ରԠ͍͚ͨ͠ͲͰ͖ͳ͍ • SKIE 0.8.4 ͸·ͩ Kotlin 2.0.20 ʹରԠ͍ͯ͠ͳ͍ • 0.9.0 ͰରԠ༧ఆ https://github.com/touchlab/SKIE/ issues/95 • ٸ͙ͳΒ 0.9.0-RC.3 Ҏ߱͸࣮੷͋Γʢcurcuit ͕࠾༻ͯ͠ ͍Δʣ https://github.com/slackhq/circuit/pull/1605

Slide 19

Slide 19 text

·ͱΊ • UUID ͸޿͘ීٴ͍ͯ͠ΔͨΊɺΞϓϦέʔγϣϯͰ௚઀ తʹɺ·ͨ͸ؒ઀తʹར༻͞ΕΔ • ඪ४ϥΠϒϥϦ΁ͷ੾Γସ͑͸ଞͷґଘؔ܎ͱͷ݉Ͷ߹ ͍Λߟྀͯ͠ܭը͕ඞཁ • ඪ४ϥΠϒϥϦ΁ͷ੾Γସ͕͑೉͍͠৔߹΋͋ͬͯɺґଘ ͢ΔϥΠϒϥϦ͕ߋ৽͞Εͨ৔߹ɺ༧ظͤͣ੾Γସ͕͑ ඞཁʹͳΔՄೳੑ΋͋Δ

Slide 20

Slide 20 text

UUID ͸·ͩ Experimental ಋೖͷλΠϛϯά͸৻ॏʹ൑அ͢Δඞཁ͕͋Γͭͭ΋ଞͷґଘؔ܎Ͱ ੾Γସ͑Λڧ੍͞ΕΔՄೳੑ΋͋ΓґଘϥΠϒϥϦͷಈ޲ʹ஫ࢹ͕ඞཁ https://kotlinlang.org/docs/whatsnew2020.html#standard-library

Slide 21

Slide 21 text

ґଘؔ܎ͱͲ͏΍ͬͯ ޲͖߹͍͖ͬͯ·͔͢ʁ

Slide 22

Slide 22 text

ΏΊΈͷ Android ٻਓ࠶։ • DroidKaigi ͷظؒதʹ Android ΤϯδχΞͷٻਓ͕Φʔϓ ϯʹͳ͍ͬͯ·͢ https://hrmos.co/pages/yumemi/jobs?category=1507125045053476864