-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish to MavenCentral? #61
Comments
Thanks for the request, I totally agree! Publishing to Maven Central would be a solid improvement. However, I've had a lot of trouble trying to make Gradle + Signing + Maven Central work in other projects, so I've been avoiding it. The ease of the Gradle Plugin Portal is a breath of fresh air in comparison! Do you know how to best set up Maven Central publishing? Do you want to make a PR? I know there are helper plugins like https://github.com/gradle-nexus/publish-plugin, but I don't like that they use discouraged techniques like |
👍 I can look into that. No promises but feel free to assign it to me. |
The Gradle config should probably be similar to how I set it up in Kotka Streams
Which ended up working for snapshots, but I didn't finish it and get regular publishing working. I'll take a look at copying over this over and cc you into the PR. Related to this, I'd like the project version number to be easier to update. Currently updating the version requires running a Gradle task to update the Dokkatoo version in all of the examples and tests, and the committing the update (example). I'm wary about automating a commit in a pipeline, because I want to manually verify the versions are updated correctly. Maybe there's a way of setting up a GitHub Workflow that creates a PR with the changes... just thinking out loud 🤔 |
Wouldn't updating the root version automatically update all child modules thanks to some classloader magic? I even believe it's more efficient that way cause it's loading the plugin classes only once? |
All of the Dokkatoo examples have version set as a string d9eb584#diff-c0dfa6bc7a8685217f70a860145fbdf416d449eaff052fa28352c5cec1a98c06 I like that the examples are plain Gradle examples, and so they can be copy and pasted, but it does mean that the files need to be updated on every release. |
I see. What we're doing is running a Kotlin script that sets the version and opens a PR for the new version. As part of this, it also updates docs/samples. It's served us well so far. |
Just curios regarding the nexus-plugin and your own publishing implementation: How do you create a staging repository and close it? |
@hfhbd There's a REST API for it. It's not super well documented but you can look at this: https://github.com/martinbonnin/vespene/blob/main/vespene-lib/src/main/kotlin/net/mbonnin/vespene/lib/NexusStagingApi.kt#L31 |
I've managed to get Maven Central publishing working! https://s01.oss.sonatype.org/content/repositories/releases/dev/adamko/dokkatoo/dokkatoo-plugin/ |
Would you consider publishing the plugin to Maven Central? Gradle Plugin Portal works too but having it in Maven Central would make it more discoverable when used in convention plugins, etc... ?
The text was updated successfully, but these errors were encountered: