Android Gradle compile project's specific flavor -


i having troubles product flavors, project contains library named core , application named i.e. app.

in build.gradle file of app module compiling library project this:

 dependencies {    compile project(':core')  } 

this working fine issue comes when want introduce specific product flavors in both library project "core" , application module "app".

in core buid.gradle file have defined 1 product flavor :

productflavors {     flavor1 {      } }  sourcesets.flavor1 {          java {             exclude '**/somefilepath/*'         } } 

now once i've added new flavor core library, want change build.gradle in app application module can compile productflavor named flavor1 core project.

i tried this, fails error "no configuration named "flavor1release" found."

dependencies {   compile project(path: ':core', configuration: 'flavor1release') } 

just sum all, want have multiple flavors in app application module , each of flavors compile different flavor core library project. way every flavor app module have different files included in build core library.

does know how can accomplish this?

as can see explicitly providing configuration compile project. don't need because "android studio" provide option

to work on files particular flavor, click on build variants on left of ide window , select flavor want modify in build variants panel,

enter image description here

for product flavors need specify following things:

productflavors {         demo {             applicationid "com.buildsystemexample.app.demo"             versionname "1.0-demo"         }         full {             applicationid "com.buildsystemexample.app.full"             versionname "1.0-full"         }     } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -