I am trying to build an Android project with Gradle.
It has following structure:
ProjectA----- MainProject,
LibA ---- Library project,
LibB ---- Library project,
LibC ---- Library project,
LibD ---- Library project,
etc...
Based on situtation, I need to include the libraries, sometimes need to include all libraries, 1 library, 2 or 3 etc. based on flavors. In settings file I have included all projects.
Does anybody know how to include/exclude libraries based on flavors?
I have tried on dependency block, there I am getting error.
Following is the sample code
dependencies {
if (task.name.matches('compileFlovor1'){
exclude module: 'LibD'
}
}
Error is: Could not find method exclude() for arguments [{module=LibD}].
Please guide me resolving this issue