<!-- lang: groovy --> dependencies { compile fileTree(dir:"${System.env.ANDROID_HOME}/tools/lib", include:["*.jar"]) } task merge << { ant { taskdef(name:"mergemanifest", classname:"com.android.ant.ManifestMergerTask", classpath:configurations.compile.asPath) mergemanifest(appManifest:"AndroidManifest.xml", outManifest:"output.xml", enabled:true) { library { path { fileset(dir:"qq", includes:"*.xml") } } } } }