title: Is it possible to add an AndroidManifest to a specific buildType with Gradle (not product flavor)?
body: <p>We're working on setting up some Activity instrumentation tests to run on a build server. Since this requires the device to be awake, the options that I've found seem to be:</p>
  
  <ol>
  <li><p>Set the devices to "Stay Awake" and disable the screen lock</p></li>
  <li><p>Disable the Keyguard programmatically in the test case (as described <a href="http://developer.android.com/tools/testing/activity_testing.html#UnlockDevice" rel="nofollow">here</a>)</p></li>
  </ol>
  
  <p>Option 1 doesn't seem great as it wastes the battery and will eventually cause burn-in on the device displays. Option 2 seems preferable, but I'd rather keep the DISABLE_KEYGUARD permission strictly to debug builds (not release) so that all product flavors are testable, but the permission is never requested for a release build. </p>
  
  <p>I know we can add manifests to merge using <code>sourceSets</code>:</p>
  
  <pre><code>android.sourceSets.development {
      manifest.srcFile 'development/AndroidManifest.xml'
  }
  </code></pre>
  
  <p>But I've not yet found an equivalent way to do so only for specific build types -- something like this (which isn't valid):</p>
  
  <pre><code>buildTypes {
      debug {
           manifest.srcFile 'debug/AndroidManifest.xml'
      }
  }
  </code></pre>
  
  <p>Is there an official way to do this? Any other recommendations? Thanks!</p>