0

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.

  • Create per-flavor source sets: https://developer.android.com/studio/build/build-variants#sourceset-build – CommonsWare Oct 06 '20 at 21:09
  • Thank you for the suggestion. I am aware of maintaining resources specific to product flavors separately. However, In my case specifically i need work with the subset of classes and resources. I am wondering why the include filters are not working on the resource files – BALA CHANDAR Oct 07 '20 at 04:11

0 Answers0