草庐IT

internalCompile

全部标签

android - 为多个变体定义依赖关系

假设我们有四种构建类型:调试、质量检查、测试版和发布。我们可以像这样定义特定变体的依赖关系:dependencies{//ThesedependenciesareonlyincludedfordebugandqabuildsdebugCompile'com.example:lib:1.0.0'qaCompile'com.example:lib:1.0.0'}有没有办法在不重复Artifact描述符的情况下为多个变体编译这些依赖项?例如,我想做这样的事情:dependencies{internalCompile'com.example:lib:1.0.0'}internalCompile