我有一个多项目设置。我创建了一个非Java项目,其工件是一个zip文件,我将在另一个项目中解压缩它。所以以下是这个想法:
my-non-java-project
build.gradle
------------
apply plugin: 'base'
task doZip(type:Zip) { ... }
task build(dependsOn: doZip) << {
}
artifacts {
archives doZip
}
some-java-project
build.gradle
------------
apply plugin: 'war'
configurations {
includeContent // This is a custom configuration
}
dependency {
includeContent project(':my-non-java-project')
}
task expandContent(type:Copy) {
// Here is where I would like get hold of the all the files
// belonging to the 'includeContent' configuration
// But this is always turning out to be empty. Not sure how do I publish
// non-java content to the local repository (as understood by groovy)
}
所以,我的问题是,如何将非Java项目的构件发布到Groovy的内部存储库中,以便我可以在另一个基于Java的项目中使用它?
:my-non-java-project:doZip
任务的outputs
,还是需要将zip发布到仓库(无论是本地文件系统还是远程)? - superEb