title: Gradle: sourceSets not working as expected
body: <p>Gradle: sourceSets not working as expected.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>android {
      ...
  
      defaultConfig {
          applicationId "com.firsthash.smartyoutubetv2"
          minSdkVersion 14
          targetSdkVersion 25
          versionCode 111
          versionName "6.8.39"
          multiDexEnabled = true
  
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
  
      sourceSets {
          main {
              res.srcDirs = ['src/main/res', 'src/main/res-exoplayer', 'src/main/res-xwalk', 'src/main/res-webview']
          }
          debug {
              res.srcDirs = ['src/main/res', 'src/main/res-exoplayer', 'src/main/res-xwalk', 'src/main/res-webview']
          }
      }
  
      productFlavors {
          full {
          }
          beta {
              applicationIdSuffix ".beta"
          }
      }
  
  }
  </code></pre>
  
  <p>The problem. Everything goes ok until I try to do an update of any project's layout file. All changes that I've made didn't reflected on the final application. I figured out that to obtain right behavior I need to manually delete project's 'build' directory. This directory contains cached build files. Such happens when I built apk using 'gradle: installDebug task' or Android Studio internal build system.</p>
  
  <p><strong>UPD</strong>: best workaround that could find is to use flavor dimensions: <a href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Multi-flavor-variants" rel="nofollow noreferrer">http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Multi-flavor-variants</a></p>