Hello. Does anyone uses dagger with android librar...
# dagger
h
Hello. Does anyone uses dagger with android libraries. How do you connect them to root component for injection? Example: Library
A
has
ModuleA
and
ComponentA
.
AppComponent
extends
ComponentA
and consumes
ModuleA
to get actual dependencies. But how do you pass
ComponentA
back to the library so it can inject itself(service for example)? Currently I have a companion object lateinit field inside `ComponentA`which I initialize in my
App
onCreate(). Is there a better way?