Pavel Sidyakin
04/02/2021, 9:07 AMinterface Dependencies {
val dependency0: Dependency0
val dependency1: Dependency1
...
}
The interface is provided to Koin outside.
We want to use DependencyX as a usual singleton dependency.
For now, we have to wrap each dependency into single() function. But this is not convenient: if we change Dependencies interface, we must change the module.
It would we great if Koin can use externally provided dependencies as his dependencies.
Motivation: component holder pattern https://proandroiddev.com/modularization-of-android-applications-in-2021-a79a590d5e5b
I tried to implement it, but the solution is weird. At least because I had to use internal property "definitions":
https://github.com/PavelSidyakin/WeatherForecast/blob/koin_experiments/feature/city_list/src/main/java/com/example/city_list/di/CityListComponentImpl.kt
Would you implement the functionality in the library? Or I can try to implement it. Can you recommend how to do it better?arnaud.giuliani
04/07/2021, 9:37 AMkoin-core-ext
which is using Java reflect to help build instance from type