0
項目,我有一個搖籃多項目構建,看起來像這樣:配置在子目錄
rootProject
build.gradle
settings.gradle
shared/
SharedLib
SharedLib2
plugins/
FirstPlugin
SecondPlugin
我想在目錄shared
作爲依賴添加的所有項目,所有項目在plugins
。
更一般地說:如何通過目錄配置子項目?
內容settings.gradle的:
include 'plugins:FirstPlugin', 'plugins:SecondPlugin', 'shared:SharedLib', 'shared:SharedLib2'
的build.gradle內容:
task wrapper(type: Wrapper) { gradleVersion = "2.1" }
allprojects{ apply plugin:"java" }
subprojects {
group = "eu.test.myGroup"
repositories { mavenCentral() }
dependencies { testCompile "junit:junit:4.11" }
}