title: How to tell Gradle to use a different AndroidManifest from the command line?
body: <p>I have a multi-module project. From the root of my project (which contains multiple modules), I want to be able to call 'gradle build' and have it use a different AndroidManifest in one of my modules depending on some parameter I pass in. What's the best way to accomplish this? Should I use a gradle.properties file or can I specify a different build.gradle somehow in my settings.gradle file? Any help appreciated!</p>
  
  <p>settings.gradle:</p>
  
  <pre><code>include 'ActionBarSherlock'
  include '&lt;main_app&gt;'
  </code></pre>
  
  <p> build.gradle:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:0.4.2'
      }
  }
  
  apply plugin: 'android'
  
  dependencies {
      compile project(':ActionBarSherlock')
  }
  
  android {
      buildToolsVersion "17.0"
      compileSdkVersion 17
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['src']
              aidl.srcDirs = ['src']
              renderscript.srcDirs = ['src']
              res.srcDirs = ['res']
              assets.srcDirs = ['assets']
          }
      }
  }
  </code></pre>
  
  <p>I'm looking for the best way to use a different AndroidManifest.xml, say one I have in //test/AndroidManifest.xml. And I need to be able to specify this change from the command-line. Any ideas?</p>