Add dependency to specific productFlavor and buildType in gradle

前端 未结 6 1751
长情又很酷
长情又很酷 2020-12-05 11:31

I\'m wondering how to add dependency to specific productFlavor and buildType in gradle. For example I have productFlavor free and build type release

6条回答
  •  萌比男神i
    2020-12-05 11:54

    There is built-in support for flavor and buildType dependencies.

    dependencies {
       flavor1Compile "..."
       freeReleaseCompile "..."
    }
    

    http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Sourcesets-and-Dependencies

提交回复
热议问题