https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Marc Knaup

08/26/2020, 5:27 PM
What kinds of libraries do you miss most in multiplatform?
👍 2
n

Nick

08/26/2020, 5:54 PM
While there is #koin, it’s not currently working with kotlin 1.4 very well.
a

aleksey.tomin

08/26/2020, 6:11 PM
1. Standard logger 2. ktor-CIO client with SSL 3. ktor-CIO server (with SSL)
2
b

bsimmons

08/26/2020, 6:30 PM
+1 for the standard logger
m

Marc Knaup

08/26/2020, 6:31 PM
@Nick what about Kodein?
Logging is a good point! Haven’t thought about that one.
n

Nick

08/26/2020, 6:34 PM
kodein works on mpp?? I thought it was just for android 🤯
m

Marc Knaup

08/26/2020, 6:36 PM
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

saket

08/26/2020, 7:47 PM
It’d be great if we had a basic library for reading and writing to files.
m

Marc Knaup

08/26/2020, 7:48 PM
@saket like the vision of
kotlinx-io
? https://github.com/Kotlin/kotlinx-io
s

saket

08/26/2020, 7:49 PM
yes, but
kotlinx-io
doesn’t support files yet and the project looks abandoned
m

Marc Knaup

08/26/2020, 7:49 PM
Yup, vision. Doesn’t seem to have a high priority indeed 😞
s

saket

08/26/2020, 7:50 PM
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

Marc Knaup

08/26/2020, 7:51 PM
Lot’s of stuff packed in one library 😮
s

saket

08/26/2020, 7:54 PM
that is exactly why I get overwhelmed by it lol
b

Big Chungus

08/26/2020, 8:28 PM
For logging there's logkat
👍 1
t

Thomas

08/26/2020, 8:35 PM
Strings.kt
m

Marc Knaup

08/26/2020, 8:35 PM
@Thomas what do you miss for Strings?
t

Thomas

08/26/2020, 8:36 PM
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

Marc Knaup

08/26/2020, 8:39 PM
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

gildor

08/27/2020, 3:22 AM
• Resources • Real compile-time DI (not service provider) • Files • Server • Logging • Good, official full-featured testing library, not kotlin-test
👍 3
m

Marc Knaup

08/27/2020, 9:39 AM
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

gildor

08/27/2020, 10:12 AM
right
not sure what do you mean by “called parameters”
m

Marc Knaup

08/27/2020, 10:15 AM
Basically passing the dependencies as function or constructor parameters. That’s most basic compile-time DI, isn’t it? 🙂
g

gildor

08/27/2020, 10:16 AM
yes, manual dependency injection, you right
s

saket

08/27/2020, 2:57 PM
Someone is working on a DI library that uses KSP: https://github.com/evant/kotlin-inject
m

Marc Knaup

08/27/2020, 3:02 PM
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

Orhan Tozan

08/30/2020, 12:52 PM
For logging, I'm using https://github.com/AAkira/Napier for awhile now, works great.
👍 1
👆 1
a

aleksey.tomin

08/30/2020, 1:24 PM
I haven’t found macOS/minGW source code. Is it exists?
r

rocketraman

02/11/2021, 6:33 PM
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