gradle中的自定义发布插件
我想为gradle实现自定义发布插件 我的目标是支持如下语法:gradle中的自定义发布插件,gradle,publish,gradle-plugin,Gradle,Publish,Gradle Plugin,我想为gradle实现自定义发布插件 我的目标是支持如下语法: publishing { publications { custom(CustomPublication) { artifact fooDistZip artifact foo2DistZip } } repositories { custom { url 'http://192
publishing {
publications {
custom(CustomPublication) {
artifact fooDistZip
artifact foo2DistZip
}
}
repositories {
custom {
url 'http://192.168.1.100:80'
}
}
}
我已经检查了,但是实现似乎相当复杂
如果您能在gradle中提供任何有关简单自定义publisher的参考资料,我们将不胜感激。听起来您希望创建一个自定义publisher,以扩展用户使用的自定义publisher 更新: 我添加了gradles文档中关于
有没有自定义实现的示例?看看文档,您似乎可以在不创建自定义发布者的情况下发布工件。我将用这里给出的例子更新我的答案。实施自定义发布服务器是否有特定的原因?
repositories {
flatDir {
name "fileRepo"
dirs "repo"
}
}
uploadArchives {
repositories {
add project.repositories.fileRepo
ivy {
credentials {
username "username"
password "pw"
}
url "http://repo.mycompany.com"
}
}
}