标签: gradle dependency-management
在gradle中,是否可以从另一个构建文件中获取构建的依赖项?
示例,想象project-1有project1/build.gradle,如何从project-2 project2/build.gradle获取相同的依赖关系?
project-1
project1/build.gradle
project-2
project2/build.gradle
答案 0 :(得分:2)
Cou可以将您的依赖项放在外部文件中,例如'dependencies.gradle'并像这样导入:
apply from: 'dependencies.gradle'