https://kotlinlang.org logo
Title
s

Smorg

08/21/2022, 1:44 AM
In addition, has anyone also tried to use Hilt from Android in a kmm project? Wondering how it can be integrated, maybe in full for DI across the project or at least the Android part/modules of the project. Thank you.
m

Mitchell Syer

08/21/2022, 3:00 AM
Hilt is a Android only library, it can probably be used for the android source-set, but not for any other platforms. You should use a KMM DI like Kotlin-Inject for multiplatform projects
s

Smorg

08/21/2022, 3:22 AM
this looks promising. thanks for recommending.
m

Matthias Geisler

08/21/2022, 7:15 AM
My std DI is Koin...
a

adjpd

08/21/2022, 5:01 PM
You can use the service locator pattern without needing a separate library. It's simple and easy to setup. Good's recommended architecture example uses it.