Codearte / gradle-nexus-staging-plugin

Automatize releasing Gradle projects to Maven Central.
Apache License 2.0
172 stars 26 forks source link

Could you please migrate to `Property<...>` APIs? #124

Closed vlsi closed 3 years ago

vlsi commented 5 years ago

Current APIs require to set properties like username/password/stagingProfileId/packageGroup/... no matter if the staging would actually take place or not.

That is I can't treat "missing username" as an error because user might be just building jars.

It would be so much better if I could just pass values via Property so it would be queried only when the task was really about to run. Then I could produce a nicer failure message that would clarify user what went wrong and which property (e.g. in gradle.properties) should be configured.

szpak commented 5 years ago

Yes, I plan to do that - the new properties already use the new API. However, I will be not backward compatible chance for nexus-publish-plugin.

szpak commented 4 years ago

FYI, based on my experience from migration in my other plugin, the Property API is not as perfect as I will be one day. See:

What's more some of the useful methods were added just in the recently released Gradle 5.6.

szpak commented 3 years ago

TL;TD. gradle-nexus-publish-plugin is already using that approach.

A longer version. To make releasing to Maven Central even easier, I and Marc Phillip (the author of nexus-publish-plugin) combined forces to create a next generation, unified, 2-in-1 plugin - gradle-nexus-publish-plugin. It is a recommended solution, as our development effort will be put in that new plugin. See my blog post and the official migration guide.