title: How do I change the build variant for a library dependency module?
body: <p>I have a 'mobile' module that depends on a 'core' module, and I keep getting the same inconsistent error:</p>
  
  <p>mobile/build.gradle:</p>
  
  <pre><code>    debug {
          buildConfigField "String", "URL_SEARCH", "\"https://mobile.debug\""
      }
      release {
          buildConfigField "String", "URL_SEARCH", "\"https://mobile.release\""
      }
  </code></pre>
  
  <p>core/build.gradle:</p>
  
  <pre><code>    debug {
          buildConfigField "String", "URL_SEARCH", "\"https://core.debug\""
      }
  
      release {
          buildConfigField "String", "URL_SEARCH", "\"https://core.release\""
      }
  </code></pre>
  
  <p>Whenever I set my variants to be mobile debug + core debug, I still get the same output inside my core.MyApplication.java file:  '<a href="https://core.release" rel="nofollow noreferrer">https://core.release</a>':</p>
  
  <p><img src="https://i.stack.imgur.com/iPdl1.png" alt="mobile+core in debug variant"></p>