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
210
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
24
GitHub PR Milestone Check を使ってみた
ykws
0
19
コードの作者がいるうちに聞こう
ykws
2
480
アラートを効果的に扱おう
ykws
1
330
visionOS に備える
ykws
0
210
モバイルアプリの操作方法を疑ってみる
ykws
0
1.5k
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
A designer walks into a library…
pauljervisheath
205
24k
Designing for humans not robots
tammielis
250
25k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Mobile First: as difficult as doing things right
swwweet
222
9k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
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