Closed eriksencosta closed 3 months ago
It's a great idea, thanks for the contribution!
@Im-Fran I forgot to add, but I found that the syntax to set the plugin changed since v1.0.0, from:
sonatypeCentralUpload {
// setup code
}
To:
tasks.named<SonatypeCentralUploadTask>("sonatypeCentralUpload") {
// setup code
}
I can't make the former work.
@eriksencosta you have to use it inside the tasks
tag, like this:
tasks {
sonatypeCentralUpload {
// ....
}
}
The plugin, by default, publishes the jar to Central once it is validated. However, some library maintainers may want to publish it manually, as Maven has a policy of never deleting a jar once it's published.
This pull request introduces a new option to
sonatypeCentralUpload
task:publishingType
. To prevent breaking previous users of the plugin, the option may be omitted. If omitted, it will continue behaving as the plugin behaves currently: it will publish the jar once it's validated:I've tested the plugin using Maven local. However, as I'm not the owner of the
cl.franciscosolis
on Central, my test always fails asinitPublishingProcess
throws anIllegalStateException
whendeploymentStatus
returnsFAILED
.