Hi!
I like the idea of your plugin, and want to propose some improvements:
Get rig of the necessity to specify the local repository. Maybe exists a way to register it automatically or use the default maven local?
repositories { maven { name = "Local" url = layout.buildDirectory.dir("repos/bundles").get().asFile.toURI() } }
Tie up tasks publish and publishToMavenCentralPortal because the second one doesn't include the first one. So I have to run both tasks to release successfully.
Make publishing type enum for convenience, to see all options immediately publishingType.set(PublishingType.USER_MANAGED).
Replace authToken with params username and password. Build an encoded token on your own.
Give the ability to specify username and password as env variables. Smth like "MAVEN_CENTRAL_USERNAME". Also accept them from gradle.properties
After all these improvements, the task will look like this by default:
mavenCentral {}
It's a good idea, and I'm thinking about how to implement it.
At first I thought about this point, considering that some people might also need to use traditional OSSRH like repositories. For example, some people want to publish it to both Maven Central and GitHub Packages, which require both ways.
Hi! I like the idea of your plugin, and want to propose some improvements:
repositories { maven { name = "Local" url = layout.buildDirectory.dir("repos/bundles").get().asFile.toURI() } }
publish
andpublishToMavenCentralPortal
because the second one doesn't include the first one. So I have to run both tasks to release successfully.publishingType.set(PublishingType.USER_MANAGED)
.authToken
with paramsusername
andpassword
. Build an encoded token on your own.username
andpassword
as env variables. Smth like "MAVEN_CENTRAL_USERNAME". Also accept them from gradle.propertiesAfter all these improvements, the task will look like this by default:
mavenCentral {}