title: Dagger 2: Gradle module dependency with implementation in another module
body: <p>I am trying to set up a project in which I have two modules <code>common-lib</code> and <code>app</code>.</p>
  
  <p>The lib module has its own Dagger component and modules, and it's supposed to be flavor agnostic.</p>
  
  <p>Now, part of it depends on flavor specific resource values declared in the module <code>app</code>, so I tried abstracting the component through an interface and  override its implementation in the module <code>app</code>.</p>
  
  <p>Dagger module declare in <code>common-lib</code> gradle module, satisfying dependencies with NoOp implementations.</p>
  
  <pre><code>    @Module
  public class NetworkConfigModule {
      @Provides
      @Singleton
      HeaderParams providesHeaderParams(NoOpHeaderParams noOpHeaderParams){
          return noOpHeaderParams;
      }
  
      @Provides
      @Singleton
      AppHostsProvider providesAppHostsProvider(NoOpAppHostsProvider noOpAppHostsProvider){
          return noOpAppHostsProvider;
      }
  }
  </code></pre>
  
  <p>Dagger module declare in <code>app</code> gradle module, satisfying dependencies with the actual implementation.  </p>
  
  <pre><code>@Module
  public class NetworkConfigModule {
  
      @Provides
      @ApplicationScope
      HeaderParams providesHeaderParams(KaufdaHeaderParams kaufdaHeaderParams){
          return kaufdaHeaderParams;
      }
  
      @Provides
      @ApplicationScope
      AppHostsProvider providesAppHostsProvider(KaufdaAppHostsProvider implementation){
          return implementation;
      }
  }
  </code></pre>
  
  <p>This doesn't work, because Dagger just doesn't override the Module class, but that's somehow expected.</p>
  
  <p>My question is, how I can set up my Dagger modules so I can use <code>HeaderParams</code> and <code>AppHostsProvider</code> interfaces in <code>common-lib</code>, but I inject their implementations in <code>app</code>.</p>