I was thinking about DI in shared code just today ...
# multiplatform
s
I was thinking about DI in shared code just today and was wondering what others are using
b
Given current limitations in native, we're just making sure to use interfaces in production in place where we want to provide test mocks
s
Kodein-DI is compatible with all multiplatform targets.
s
I looked at Kodein but I dislike that its APIs leak into code everywhere
t
Even with Kodein modules?
k
We are using static registry, with factory that initializes all services. Example: https://gist.github.com/petrukhnov/3453e975626a96e624625e1c937ee34f
s
yea I was trying to avoid manually handwriting everything
I ended up using a combination of Dagger and Koin. Bit of a strange setup, but works.
I am using @kpgalligan's secret fork of koin. Not sure how stable it is though :p