Is there a way in Kodein to evaluate all bindings?...
# kodein
j
Is there a way in Kodein to evaluate all bindings? Eg. at one point I would like to evaluate whether or not all declared bindings can be provided with their required parameters
s
Unfortunately, no. This is due to contexts and factory arguments that must be provided at retrieval, and that cannot be "invented".
i
@Jan Stoltman you can use
Kodeintrigger()
- I do it for all debug build to make sure all bindings in Activities and Fragments are there. Check this class in my project https://github.com/igorwojda/android-showcase/blob/master/feature_base/src/main/java/com/igorwojda/showcase/feature/base/presentation/activity/InjectionActivity.kt
This approach is not perfect but it has quite high “dependency coverage” assuming app is tested by testers taking a look at every screen once a while
j
That’s exactly what I’m looking for, thanks!