youngjuning / issues

一寸欢喜 - 怕什么真理无穷,进一寸有一寸的欢喜
https://youngjuning.js.org
44 stars 4 forks source link

解决被依赖module中BuildConfig.DEBUG的值总为false问题 #185

Closed youngjuning closed 4 years ago

youngjuning commented 5 years ago

子模块的 build.gradle 中设置:

android {
    publishNonDefault true
}

然后在模块的依赖处,例如 app 模块的 build.gradle 中改进依赖的写法:

dependencies {
    releaseCompile project(path: ':module', configuration: 'release')
    releaseStagingCompile project(path: ':module', configuration: 'releaseStaging')
    debugCompile project(path: ':module', configuration: 'debug')
}
youngjuning commented 5 years ago

https://blog.csdn.net/fly_yuge/article/details/51754640

youngjuning commented 5 years ago

https://www.jianshu.com/p/c15d594cad63

youngjuning commented 5 years ago

https://www.jianshu.com/p/3d9b23afe514