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
14
GitHub PR Milestone Check を使ってみた
ykws
0
14
コードの作者がいるうちに聞こう
ykws
2
460
アラートを効果的に扱おう
ykws
1
320
visionOS に備える
ykws
0
200
モバイルアプリの操作方法を疑ってみる
ykws
0
1.5k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
GraphQLとの向き合い方2022年版
quramy
44
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
A better future with KSS
kneath
238
17k
Making Projects Easy
brettharned
116
5.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
4 Signs Your Business is Dying
shpigford
181
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Six Lessons from altMBA
skipperchong
27
3.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Typedesign – Prime Four
hannesfritz
40
2.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
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