android - gradle multiproject include and exclude libraries -
i trying build android project gradle. it has following structure: projecta----- mainproject, liba ---- library project, libb ---- library project, libc ---- library project, libd ---- library project, etc... based on situtation, need include libraries, need include libraries, 1 library, 2 or 3 etc. based on flavors. in settings file have included projects. does know how include/exclude libraries based on flavors? i have tried on dependency block, there getting error. following sample code dependencies { if (task.name.matches('compileflovor1'){ exclude module: 'libd' } } error is: not find method exclude() arguments [{module=libd}]. please guide me resolving issue do add flavour specific dependencies must configure according configuration. let's have flavours "free" , "payed" android { productflavors { free paid } } then can set flavour specific depende...