I have been working on creating multiple product flavors. I have a requirement to include only specific set of file into the build from the source directory. I have used the include filters as given below
lean {
java{
srcDirs = ['src/main/java']
setIncludes(new HashSet(['com/zos/zid/CustomBuild.java']))
}
res {
srcDirs = ['src/main/res']
setIncludes(new HashSet(['drawable/**']))
}
manifest.srcFile 'src/main/AndroidManifest.xml'
}
The include filter works as expected for the Java sources, however it does not work for the Android resource files.