publish-plugin icon indicating copy to clipboard operation
publish-plugin copied to clipboard

Additional task for both publishing and closing staging repository

Open matshou opened this issue 3 years ago • 4 comments

There should be a single Gradle task that both published and closes staging repository.

For now we have to run the following Gradle command to achieve this:

./gradlew publishToSonatype closeSonatypeStagingRepository

It would be a lot simpler to have an aggregate task that could be called like such:

./gradlew publishToSonatypeAndCloseStagingRepository

matshou avatar Mar 18 '21 20:03 matshou

Looking at the implementation details publishing is somehow different operation than releasing. It can be done separately or with different configuration. Would you also want to have one for publishToSonatypeAndCloseAndReleaseStagingRepository?

szpak avatar Mar 18 '21 20:03 szpak

Would you also want to have one for publishToSonatypeAndCloseAndReleaseStagingRepository ?

That would also be useful, perhaps it can be called publishToSonatypeAndReleaseStagingRepository.

matshou avatar Mar 18 '21 20:03 matshou

That would also be useful, perhaps it can be called publishToSonatypeAndReleaseStagingRepository.

This is somehow inconsistent with other tasks. In the context of preceding publishing the release operation has to be done before the release on, but in general release can be used on its own (e.g. if the new version is published and staging repository is closed and after manual testing that version is being released - in a separate Gradle call, even days after the previous operation).

In the past we had also requests to limit number of tasks, with the argument used that if needed, it is easy to create a small orchestrating tasks (with dependsOn), while removing or hiding task is somehow more complicated.

Personally, I'm not a big fan of adding that task(s), but let's wait for opinions of the other users.

szpak avatar Mar 18 '21 20:03 szpak

I don't think we need this combined task. The more task combinations we add the more confusing it gets, doesn't it?

marcphilipp avatar Mar 19 '21 08:03 marcphilipp