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
Kotlin 2.0.20 から標準ライブラリで UUID が使えるようになりました
Search
KAWASHIMA Yoshiyuki
September 24, 2024
1
190
Kotlin 2.0.20 から標準ライブラリで UUID が使えるようになりました
KAWASHIMA Yoshiyuki
September 24, 2024
Tweet
Share
More Decks by KAWASHIMA Yoshiyuki
See All by KAWASHIMA Yoshiyuki
SwiftUI Drag & Drop で困った話
ykws
0
9
GitHub PR Milestone Check を使ってみた
ykws
0
12
コードの作者がいるうちに聞こう
ykws
2
440
アラートを効果的に扱おう
ykws
1
310
visionOS に備える
ykws
0
190
モバイルアプリの操作方法を疑ってみる
ykws
0
1.5k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Site-Speed That Sticks
csswizardry
0
45
Making the Leap to Tech Lead
cromwellryan
133
8.9k
The World Runs on Bad Software
bkeepers
PRO
65
11k
How to Ace a Technical Interview
jacobian
276
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Designing Experiences People Love
moore
138
23k
Practical Orchestrator
shlominoach
186
10k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
150
Transcript
YUMEMI.grow DroidKaigi.onCompletion { 2024@Online } 2024.09.25 Kotlin 2.0.20 ͔Β ඪ४ϥΠϒϥϦͰ
UUID ͕ ͑ΔΑ͏ʹͳΓ·ͨ͠ KAWASHIMA Yoshiyuki
͍͑ͨ͜ͱ • Kotlin 2.0.20 ͔Βඪ४ϥΠϒϥϦͰ UUID ͕͑ΔΑ͏ʹ ͳͬͨ͜ͱ • UUID
Λඪ४ϥΠϒϥϦʹΓସ͑Δʹ͋ͨͬͯͷҙ • ґଘؔͱͲ͏͖ͬͯ߹͍͔ͬͯ͘
ґଘؔͱͲ͏ͬͯ ͖߹͍ͬͯ·͔͢ʁ
ґଘؔ • OS • ݴޠ • SDK • ϥΠϒϥϦ
ґଘؔͱͷ͖߹͍ํ • Dependabot Ͱि࣍Ͱߋ৽ • େ͖ͳมߋ͕͋ͬͨ࣌ʹ·ͱΊͯߋ৽ • ͳΔ͘ߋ৽͠ͳ͍ • ͦͷଞʢ͓͢͢Ίͷߋ৽ϑϩʔπʔϧ͕͋Εੋඇ
νϟοτཝʹʣ
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
Ϛʔδͨ͠ΒΫϥογϡͨ͠ • Ϗϧυύε͢Δ͕ىಈͨ͠ޙʹΫϥογϡͨ͠ • kotlin.native.internal.IrLinkageError: Reference to class 'Uuid' can
not be evaluated: No class found for symbol ‘kotlin.uuid/Uuid|null[0]'
kotlin.uuid/UUID?
ڞ௨ͷ Kotlin ඪ४ϥΠϒϥϦʹ͓͚Δ UUID ͷ αϙʔτ Kotlin 2.0.20 ͔Βಋೖ͞Ε·ͨ͠ https://kotlinlang.org/docs/whatsnew2020.html#standard-library
ϦϦʔεϊʔτΛվΊͯݟΔͱ Kotlin 2.0.20 ͕σϑΥϧτʹͳͬͯͨ https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.2
͞ΒʹϦϦʔεϊʔτΛεΫϩʔϧ͢Δͱɺ kotlin.uuid.Uuid ʹରԠͯͨ͠ https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.2
͜Ε·ͰͲ͏͍͔ͯͨ͠ • Java ͷ UUID Ϋϥε͔͠ͳ͔ͬͨ • JVM ϓϥοτϑΥʔϜͰ͋Εͳ͍ •
Kotlin Multiplatform Ͱ Java ͷϥΠϒϥϦΛར༻Ͱ͖ͳ ͍ • Kotlin Multiplatform ରԠͷαʔυύʔςΟͷ UUID ϥΠϒ ϥϦΛར༻͍ͯͨ͠
Ϋϥογϡαϯϓϧίʔυ • https://github.com/ykws/uuid- runtime-exception-sample
Json.encodeToString Ͱ αʔυύʔςΟͷ Uuid Λ Serialize ͢Δ෦ͰΫϥογϡ͠·͢
ΫϥογϡͷݪҼ • kotlinx-serialization-json 1.7.2 Ҏ߱ɺඪ४ϥΠϒϥϦͷ kotlin.uuid ʹґଘ͍ͯ͠Δ • αʔυύʔςΟͷ uuid
Λ༻͍ͯͨͨ͠Ίɺ kotlinx- serialization-json ଆͰ kotlin.uuid/Uuid ͷΫϥεղܾ͕Ͱ ͖ͳ͔ͬͨ
ճආ͢Δʹ • kotlinx-serialization-json 1.7.1 Λ༻͠ଓ͚Δ • αʔυύʔςΟͷ UUID Λඪ४ϥΠϒϥϦʹΓସ͑Δ
ؒతʹར༻͍ͯ͠Δέʔε • KableʢKotlin Asynchronous Bluetooth Low Energy) Ͱ αʔυύʔςΟͷ UUID
ϥΠϒϥϦʹґଘ͍ͯ͠Δ https://github.com/JuulLabs/kable • 0.36.0 ͷϚΠϧετʔϯͰରԠ༧ఆ https://github.com/ JuulLabs/kable/pull/758
ରԠ͍͚ͨ͠ͲͰ͖ͳ͍ • 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
·ͱΊ • UUID ͘ීٴ͍ͯ͠ΔͨΊɺΞϓϦέʔγϣϯͰ తʹɺ·ͨؒతʹར༻͞ΕΔ • ඪ४ϥΠϒϥϦͷΓସ͑ଞͷґଘؔͱͷ݉Ͷ߹ ͍Λߟྀͯ͠ܭը͕ඞཁ • ඪ४ϥΠϒϥϦͷΓସ͕͍͑͠߹͋ͬͯɺґଘ
͢ΔϥΠϒϥϦ͕ߋ৽͞Εͨ߹ɺ༧ظͤͣΓସ͕͑ ඞཁʹͳΔՄೳੑ͋Δ
UUID ·ͩ Experimental ಋೖͷλΠϛϯά৻ॏʹஅ͢Δඞཁ͕͋ΓͭͭଞͷґଘؔͰ Γସ͑Λڧ੍͞ΕΔՄೳੑ͋ΓґଘϥΠϒϥϦͷಈʹࢹ͕ඞཁ https://kotlinlang.org/docs/whatsnew2020.html#standard-library
ґଘؔͱͲ͏ͬͯ ͖߹͍͖ͬͯ·͔͢ʁ
ΏΊΈͷ Android ٻਓ࠶։ • DroidKaigi ͷظؒதʹ Android ΤϯδχΞͷٻਓ͕Φʔϓ ϯʹͳ͍ͬͯ·͢ https://hrmos.co/pages/yumemi/jobs?category=1507125045053476864