I'm create a Dagger AppComponent in my application as below
protected AppComponent createComponent() {
return DaggerAppComponent.builder().appModule(new AppModule(this)).build();
}
The AppModule includes a `FeatureModule as below.
@Module(includes = {FeatureModule.class})
public class AppModule {
// All the provides here
}
Now, I plan to have a separate item for Debug build in the FeatureModule. So I create my FeatureDebugModule inheriting from FeatureModule
@Module
public class FeatureDebugModule extends FeatureModule {
@Override
protected void debugBuildSpecificConfig() {
// Something specific to debug
}
}
With that I also create AppDebugModule inherit from AppModule
@Module(includes = {FeatureDebugModule.class})
public class AppDebugModule : AppModule {
}
And lastly, I made I made AppDebugApplication that setup the Dagger Component as below
protected AppComponent createComponent() {
return DaggerAppComponent.builder().appModule(new AppDebugModule(this)).build();
}
Somehow, the code doesn't access the FeatureDebugModule in my debug mode, but still on the FeatureModule code. What did I do wrong?