Closed vlsi closed 3 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.
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.
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.
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. ingradle.properties
) should be configured.