我正在尝试配置单独的工件发布任务。完成此任务后,我不想发布该项目的常规出版物,而希望发布另一本出版物。
以下设置适用于工件Gradle插件4.4.12
-但使用4.7.3
时,发布不再部署到工件。
我可以看到任务generatePomFileForPaypalWiremockPublication
和publishPaypalWiremockPublicationToMavenLocal
。但是运行任务publishRecordedStubs
不会静默部署工件。
//generate the artifact containing the paypal stubs
task('paypalWiremock', type: org.gradle.jvm.tasks.Jar, dependsOn: 'stubRecording') {
baseName = "paypal-express-app-wiremock"
group = 'Build'
from('build/wiremock-stubs') {
include '**/*'
into "wiremock/paypal"
includeEmptyDirs = false
}
}
//separate publication definitions for jar with wiremock stubs
//since we do not want this to be published on master builds
publishing {
publications {
paypalWiremock(MavenPublication) {
artifact tasks.paypalWiremock {
artifactId "paypal-express-app-wiremock"
}
}
}
}
//tasks publishing the paypal wiremock stub jar
task ('publishRecordedStubs', type: ArtifactoryTask, dependsOn: ['generatePomFileForPaypalWiremockPublication', 'paypalWiremock']) {
publications('paypalWiremock')
}
不幸的是,在这种情况下似乎没有任何例子。非常感谢您对此工作的任何帮助。