android - Dependency configurations -


i know if make library uses product flavors, when use library in application, can in gradle:

dependencies {     flavor1compile(path: '{path}', configuration: 'flavor1config')     flavor2compile(path: '{path}', configuration: 'flavor2config') } 

i know can this:

dependencies {     debugcompile(path: '{path}', configuration: 'debugconfig')     releasecompile(path: '{path}', configuration: 'releaseconfig') } 

what want this:

dependencies {     flavor1debugcompile(path: '{path}', configuration: 'flavor1debugconfig')     flavor1releasecompile(path: '{path}', configuration: 'flavor1releaseconfig')     flavor2debugcompile(path: '{path}', configuration: 'flavor2debugconfig')     flavor2releasecompile(path: '{path}', configuration: 'flavor2releaseconfig') } 

but code produces this:

error:(30, 0) gradle dsl method not found: 'flavor1debugcompile()' possible causes:

  • the project 'android' may using version of gradle not contain method. open gradle wrapper file
  • the build file may missing gradle plugin. apply gradle plugin
  • is there way this?

    there an open bug on android issue tracker support this.

    as of right now, can accomplish declaring configuration each combination want use:

    configurations {   flavor1debugcompile }   dependencies {   flavor1debugcompile(path: '{path}', configuration: 'flavor1debugconfig') } 

    Comments

    Popular posts from this blog

    java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

    sql - Postgresql tables exists, but getting "relation does not exist" when querying -

    asp.net mvc - breakpoint on javascript in CSHTML? -