title: Reference different assets based on build flavor
body: <p>I am able to get the correct <code>api_key.txt</code> on <code>debug</code> builds because that is a <code>buildType</code>. However I am unable to get this working with the productFlavor <code>amazon</code>.</p>
  
  <p>I’ve tried doing this in my <code>build.gradle</code> file which compiles but it will not actually reference the correct file at run time:</p>
  
  <pre><code>sourceSets {
  amazon {
    assets.srcDirs = ['app/src/amazon/assets']
  }
  </code></pre>
  
  <p>Here is my folder structure:</p>
  
  <p><a href="https://i.stack.imgur.com/JxSgu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JxSgu.png" alt="folder structure"></a></p>
  
  <p>How can I reference <code>api_key.txt</code> in the <code>amazon/assets</code> folder when my product flavor is <code>amazon</code>?</p>
  
  <p>All help is greatly appreciated, thank you.</p>