Dagger 2 Create a sub-component with a component without module binding
I have some sub-components that I am updating to use Builders.
Im declaring subcomponents on their parent modules. I have one module that doesn't have any bindings, so it only exists so that I can inject my subcomponent linker.
@MySubcomponentScope @Subcomponent(modules = MySubcomponent.Module.class) interface MySubcomponent {
@dagger.Module(subcomponents = DeeperSubcomponent.class) abstract class Module { } // All the bindings are in MySubcomponent.Builder.
}
Is there a way to get around this empty module class?
Complete and tiny working example to show my question exactly: https://gist.github.com/NightlyNexus/82c8138816c6b4db9afd7785f3396f47
+3
source to share
No one has answered this question yet
Check out similar questions: