How to exclude certain files from compiling


(no name) #1

I am extending my android application flavour as follow

productFlavors {
ukProd {
applicationId ".a.h***.ukprod"
resValue ‘string’, ‘app_name’, “test”

wetProd {
applicationId ".a.h***.wetProd"
resValue ‘string’, ‘app_name’, “testq”
sourceSets {

wetProd {
java.srcDirs =
There is one class called model in ukProd flavour that I want to exclude during the compile time. I am find it difficult that how to use

exclude ‘mytasks/’

in the above gradle command.

Many thanks.