I have a Java project that build and publish many jars (a.jar, b.jar, ...) using :
publishing {
publications {
a (MavenPublication) {
artifactId 'a'
artifact aJar
}
b (MavenPublication) {
artifactId 'a'
artifact aJar
}
}
}
repositories { ...
I have also define a z.jar and I want a special task to publish it and I want to not build / publish it for the build and publish (publishToMaven*) tasks.
How can I define this kind of task ?
I try something like that and other variant and it failed to compile the gradle :
task zPublish(type: PublishToMavenRepository) {
publication = new MavenPublication() {
artifactId 'z'
artifact zJar
}
}
I search in the source of maven-publish plugin without success.
Thanks for a good idea.