kordamp / kordamp-gradle-plugins

A collection of Gradle plugins
https://kordamp.org/kordamp-gradle-plugins/
Apache License 2.0
138 stars 25 forks source link

Find an alternative to publish artifacts to Maven Central #448

Closed aalmiray closed 3 years ago

aalmiray commented 3 years ago

See #447

musketyr commented 3 years ago

I believe this is the way https://github.com/gradle-nexus/publish-plugin (as @melix is using it in his own projects 🎖️ )

aalmiray commented 3 years ago

I spoke with Marcin and yes, this is the way to go. I still have to figure out multi-project releases though.

musketyr commented 3 years ago

cool. so I will just create my next OSS lib using the latest Kordamp and upgrade it once you figure this out 😺

musketyr commented 3 years ago

here are some examples of repositories using version 0.45.0 and publishing to the Maven Central

https://github.com/agorapulse/micronaut-worker https://github.com/agorapulse/micronaut-aws-sdk

aalmiray commented 3 years ago

Thanks. I ended up using the profiles plugin to setup the GNPP as it messes up with local publication. GNPP always rewrites publishing URLs thus it's no longer possible to publish locally and check files unless the plugin is not applied.

https://github.com/kordamp/kordamp-parent/blob/master/plugins/kordamp-parentpom/src/main/groovy/org/kordamp/gradle/KordampParentPomPlugin.groovy

musketyr commented 3 years ago

But will you be able to close the staging repository?

musketyr commented 3 years ago

I'm running publishToMavenLocal without any issue

aalmiray commented 3 years ago

Yes, closing the repository is not a problem. publishToMavenLocal is not an issue, it's invoking the publish task to write artifacts to the localReleases or localSnapshots directory the one that fails because GNPP is too broad in its configuration.

aalmiray commented 3 years ago

The kordamp-parentpom provides the behavior needed for this build. The GNPP plugin provides behavior for any Gradle build.