title: How to use different set of resources (images, themes, etc.) during builds in Android Studio?
body: <p>We need to build different looking apps for different clients from the same source base.  The app for each client has to be branded - i.e. must have different images, colors, etc.  Most of the resources - e.g. layouts, strings - will be shared among all clients.<br>
  We are thinking of using <code>sourceSet</code> in <code>build.gradle</code>. For example:</p>
  
  <pre><code>android {
  ...
      sourceSets {
          Main {
              // resources common to all clients
              resSrcDirs = 'res'
              // resources specific to client1
              resSrcDirs += 'client1/res' 
              // resources specific to client2
              //resSrcDirs += 'client2/res'
              ...
  
              // The same approach taken for manifest that contains application theme
              manifestSrcFile=client1/AndroidMainifest.xml
              // manifestSrcFile=client2/AndroidManifiest.xml
              ...
          }
      }
  }
  </code></pre>
  
  <p>Before each build we will uncomment/comment out selected lines in <code>build.gradle</code>.</p>
  
  <p>We think that this would work but wonder if there is a better way of doing it.</p>