What kinds of libraries do you miss most in multip...
# multiplatform
m
What kinds of libraries do you miss most in multiplatform?
šŸ‘ 2
n
While there is #koin, it’s not currently working with kotlin 1.4 very well.
a
1. Standard logger 2. ktor-CIO client with SSL 3. ktor-CIO server (with SSL)
āž• 2
b
+1 for the standard logger
m
@Nick what about Kodein?
Logging is a good point! Haven’t thought about that one.
n
kodein works on mpp?? I thought it was just for android 🤯
m
Yeah it’s multiplatform by now, thanks to
typeOf()
. I stopped using it though as I find it too heavy (esp. the API). I rarely need more logic than ā€œgive my an instance for this classā€. No tagging, factories, providers, etc.
šŸ‘ 1
OTOH writing DI properly isn’t too easy either šŸ˜…
šŸ‘ 1
s
It’d be great if we had a basic library for reading and writing to files.
m
@saket like the vision of
kotlinx-io
? https://github.com/Kotlin/kotlinx-io
s
yes, but
kotlinx-io
doesn’t support files yet and the project looks abandoned
m
Yup, vision. Doesn’t seem to have a high priority indeed šŸ˜ž
s
There’s also https://github.com/orangy/kotlinx-files but it hasn’t been updated in a while either.
I’ve been keeping an eye on https://github.com/caffeine-mgn/pw.binom.io
m
Lot’s of stuff packed in one library 😮
s
that is exactly why I get overwhelmed by it lol
b
For logging there's logkat
šŸ‘ 1
t
Strings.kt
m
@Thomas what do you miss for Strings?
t
Multiplatform string resources. Currently I have a simple Gradle script that converts Android strings.xml to iOS localizable file, but a real multiplatform solution would be better
m
Ah, a string localization solution. You could help build one on top of this: https://github.com/fluidsonic/fluid-locale/blob/master/sources/common/LocalizedValueResolver.kt It’s basically for resolving a values based on a Locale w/ hierarchy in mind (
zh-Hant-CN
->
zh-Hant
->
zh
->
root
).
You you could create a Gradle plugin to generate an even more efficient resolution like I do with country name localization: https://raw.githubusercontent.com/fluidsonic/fluid-i18n/master/modules/data-regions/sources/common/RegionNames_normal.generated.kt It’s fun šŸ˜„
But we’d still have to add support for pluralization and placeholders based on Unicode standards & CLDR.
g
• Resources • Real compile-time DI (not service provider) • Files • Server • Logging • Good, official full-featured testing library, not kotlin-test
šŸ‘ 3
m
Regarding DI you basically mean a compile-time check for whether dependencies will properly resolve at runtime? Otherwise it's called parameters, isn't it?
g
right
not sure what do you mean by ā€œcalled parametersā€
m
Basically passing the dependencies as function or constructor parameters. That’s most basic compile-time DI, isn’t it? šŸ™‚
g
yes, manual dependency injection, you right
s
Someone is working on a DI library that uses KSP: https://github.com/evant/kotlin-inject
m
Haven't heard of ksp - sounds great! Maybe I can make my JSON library easily multiplatform by that 😃 I also need a multiplatform KAPT replacement for my graphql library.
o
For logging, I'm using https://github.com/AAkira/Napier for awhile now, works great.
šŸ‘ 1
šŸ‘† 1
a
I haven’t found macOS/minGW source code. Is it exists?
r
For logging, I started with Napier but switched to Kermit. Napier relies too much on objects (statics) and so was making things more difficult than necessary. https://github.com/touchlab/Kermit