Share publishing of a plugin to portal with users

I develop a number of plugins as part of my work on Hibernate. I’d like to share the ability to publish these with other team members. They say they are not able to publish:

  The user 'xyz' does not have write permissions to plugin [my.plugin.name]

Is there something I need to do allow others to publish?

Thanks

Bueller? Bueller? :wink:

Bump again.

Surely I’m not the only one as part of a development community publishing plugins that would like to share publishing capabilities…

Hey Steve,

Unfortunately, we don’t have a way to grant other users permission to publish plugins.

As a workaround, you could create a shared account and we can transfer the ownership of the plugin to that account. Just let us know if you’d like to do that.

Thanks @sterling

I’ll create a user to which to transfer ownership. I do need the ability to create a user whose email address does not show up though. Is that possible?

@sterling was there an official way I was supposed to request this transfer?

https://github.com/gradle/plugin-portal-requests/issues/new/choose

Choose the plugin ownership transfer template.

Thanks again James :slight_smile:

Relatedly, based on the way the API keys are used (“unscoped” in ~/.gradle/gradle.properties), it seems like its not very easy to have the ability to publish plugins under 2 different portal users. E.g. I develop some plugins that I want under the “Hibernate umbrella”, but I also develop some plugins that should be published still under my personal user. As far as I can see, that means opening ~/.gradle/gradle.properties every time and changing gradle.publish.key and gradle.publish.secret every time I need to publish a plugin. Am I missing something there?

Updated the link above. Apparently GitHub mobile app handles the link slight differently, so I don’t think you would have seen the template option in a normal browser.

You can configure different properties for this as long as you get them to the correct location by the time the publish tasks run. From the plugin publishing docs:

It is common practice to copy and paste the text into your $HOME/.gradle/gradle.properties file, but you can also place it in any other valid location. All that the plugin requires is that gradle.publish.key and gradle.publish.secret are available as project properties when the appropriate Plugin Portal tasks are executed.

It technically will change things a little bit for everyone you want to share with, but I think that’s actually a good thing so that no one accidentally publishes a non-Hibernate project with the Hibernate shared credentials.

Put something like this in your build.gradle and tell your publishers to set those values as hibernate.gradle.publish.key and hibernate.gradle.publish.secret instead:

ext.gradle.publish.key = project.findProperty('hibernate.gradle.publish.key')
ext.gradle.publish.secret = project.findProperty('hibernate.gradle.publish.secret')

Thanks James.

That’s a decent solution. I’d rather see groups as I think it is more natural, but this will definitely work.