Gradle: add dependency for a specific flavour of the library

前端 未结 3 1043
你的背包
你的背包 2020-12-01 04:45

I have a library project and a application. I\'d like to have 2 product flavours (store, dev) for both library and application. When I build the store<

3条回答
  •  星月不相逢
    2020-12-01 04:49

    To define specific dependency for each flavor you can use "nameOfTheFlavorCompile" instead of "compile"

    dependencies {
        storeCompile project(':lib')
    }
    

提交回复
热议问题