Publishing new Gradle plugin version to Gradle Plugins portal

plugins

(Semen Levin) #1

Hello,

I’ve written a plugin that heavly uses classes of com.gradle.plugin-publish without applying this plugin.

I’m trying to publish new plugin version of plugin name.remal.agent to Gradle Plugins portal, but new version can’t be seen on portal.

Please take a look on log:

Publishing plugin name.remal.agent version 1.0.24.5
Requesting POST https://plugins.gradle.org/api/v1/publish/versions/new/name.remal.agent: {“pluginId”:“name.remal.agent”,“pluginVersion”:“1.0.24.5”,“mavenCoordinates”:{“groupId”:“name.remal”,“artifactId”:“gradle-plugins”,“version”:“1.0.24.5”},“displayName”:“name.remal.agent”,“buildMetadata”:{“gradleVersion”:“4.6”},“description”:“Plugin that configures Java agents.”,“webSite”:“https:// gitlab com /remal/name.remal.gradle-plugins”,“vcsUrl”:“https:// gitlab com /remal/name.remal.gradle-plugins.git”,“tags”:[“agent”,“java”],“artifacts”:[{“hash”:“fb734c18f517fb9c05f4214f6413d1a61fb46704e56444f10c9e0ce874446446”,“type”:“JAR”},{“hash”:“469a3b333fc1f46f7fffa323d11b09d38dd60be842af8e2c2a2ff7b77edb81d6”,“type”:“SOURCES”},{“hash”:“27705a69d34d104136bd8c44cc4b28525ae812936c485bc5183a644163f26596”,“type”:“JAVADOC”},{“hash”:“8af93f0ead13ccc05618a48f65c2f0925ae4996e186f00065b7369d6e364b809”,“type”:“GROOVYDOC”},{“hash”:“3e436cfba7073d1fb92a7c127fcdc558974f333be7993674bbbb525679895352”,“type”:“POM”}]}
Server responded with: {“pluginId”:“name.remal.agent”,“version”:“1.0.24.5”,“publishTo”:{“8af93f0ead13ccc05618a48f65c2f0925ae4996e186f00065b7369d6e364b809”:“https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/8af93f0ead13ccc05618a48f65c2f0925ae4996e186f00065b7369d6e364b809/gradle-plugins-1.0.24.5-groovydoc.jar?x-amz-acl\u003dpublic-read\u0026X-Amz-Algorithm\u003dAWS4-HMAC-SHA256\u0026X-Amz-Date\u003d20180319T123720Z\u0026X-Amz-SignedHeaders\u003dhost\u0026X-Amz-Expires\u003d3600\u0026X-Amz-Credential\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Signature\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,“27705a69d34d104136bd8c44cc4b28525ae812936c485bc5183a644163f26596”:“https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/27705a69d34d104136bd8c44cc4b28525ae812936c485bc5183a644163f26596/gradle-plugins-1.0.24.5-javadoc.jar?x-amz-acl\u003dpublic-read\u0026X-Amz-Algorithm\u003dAWS4-HMAC-SHA256\u0026X-Amz-Date\u003d20180319T123720Z\u0026X-Amz-SignedHeaders\u003dhost\u0026X-Amz-Expires\u003d3600\u0026X-Amz-Credential\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Signature\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,“3e436cfba7073d1fb92a7c127fcdc558974f333be7993674bbbb525679895352”:“https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/3e436cfba7073d1fb92a7c127fcdc558974f333be7993674bbbb525679895352/gradle-plugins-1.0.24.5.pom?x-amz-acl\u003dpublic-read\u0026X-Amz-Algorithm\u003dAWS4-HMAC-SHA256\u0026X-Amz-Date\u003d20180319T123720Z\u0026X-Amz-SignedHeaders\u003dhost\u0026X-Amz-Expires\u003d3600\u0026X-Amz-Credential\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Signature\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,“469a3b333fc1f46f7fffa323d11b09d38dd60be842af8e2c2a2ff7b77edb81d6”:“https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/469a3b333fc1f46f7fffa323d11b09d38dd60be842af8e2c2a2ff7b77edb81d6/gradle-plugins-1.0.24.5-sources.jar?x-amz-acl\u003dpublic-read\u0026X-Amz-Algorithm\u003dAWS4-HMAC-SHA256\u0026X-Amz-Date\u003d20180319T123720Z\u0026X-Amz-SignedHeaders\u003dhost\u0026X-Amz-Expires\u003d3600\u0026X-Amz-Credential\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Signature\u003d5ab1badc45a3bf4c42f8162537c1c567c84d89668b2fa41714946e5f2ff73343”,“fb734c18f517fb9c05f4214f6413d1a61fb46704e56444f10c9e0ce874446446”:“https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/fb734c18f517fb9c05f4214f6413d1a61fb46704e56444f10c9e0ce874446446/gradle-plugins-1.0.24.5.jar?x-amz-acl\u003dpublic-read\u0026X-Amz-Algorithm\u003dAWS4-HMAC-SHA256\u0026X-Amz-Date\u003d20180319T123719Z\u0026X-Amz-SignedHeaders\u003dhost\u0026X-Amz-Expires\u003d3600\u0026X-Amz-Credential\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request\u0026X-Amz-Signature\u003dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”},“warning”:false,“failed”:false}

Uploading artifact build\libs\gradle-plugins-1.0.24.5.jar to https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/fb734c18f517fb9c05f4214f6413d1a61fb46704e56444f10c9e0ce874446446/gradle-plugins-1.0.24.5.jar?x-amz-acl=public-read&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180319T123719Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Uploading artifact build\libs\gradle-plugins-1.0.24.5-sources.jar to https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/469a3b333fc1f46f7fffa323d11b09d38dd60be842af8e2c2a2ff7b77edb81d6/gradle-plugins-1.0.24.5-sources.jar?x-amz-acl=public-read&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180319T123720Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Uploading artifact build\libs\gradle-plugins-1.0.24.5-javadoc.jar to https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/27705a69d34d104136bd8c44cc4b28525ae812936c485bc5183a644163f26596/gradle-plugins-1.0.24.5-javadoc.jar?x-amz-acl=public-read&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180319T123720Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Uploading artifact build\libs\gradle-plugins-1.0.24.5-groovydoc.jar to https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/8af93f0ead13ccc05618a48f65c2f0925ae4996e186f00065b7369d6e364b809/gradle-plugins-1.0.24.5-groovydoc.jar?x-amz-acl=public-read&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180319T123720Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Uploading artifact build\publications\mavenDefault\pom-default.xml to https:// s3 amazonaws com /plugins-artifacts.gradle.org/name.remal/gradle-plugins/1.0.24.5/3e436cfba7073d1fb92a7c127fcdc558974f333be7993674bbbb525679895352/gradle-plugins-1.0.24.5.pom?x-amz-acl=public-read&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180319T123720Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Activating plugin name.remal.agent version 1.0.24.5
Requesting POST https://plugins.gradle.org/api/v1/publish/versions/activate/name.remal.agent/1.0.24.5: {“pluginId”:“name.remal.agent”,“version”:“1.0.24.5”}
Server responded with: {“successMessage”:“Success”,“failed”:false}

As you can see, there are no error/warning messages. But version 1.0.24.5 can’t be found: https://plugins.gradle.org/plugin/name.remal.agent/1.0.24.5

What am I doing wrong?

PS: Values of X-Amz-Credential and X-Amz-Signature are hidden, but I can provide a full log.


(Eric Wendelin) #2

Why would you want to duplicate the plugin-publish plugin so heavily instead of using it?

What’s happening here is that the Plugin Portal thinks this is a completely new plugin and “successfully” submitted the plugin for approval.

The plugin-publish plugin typically prefixes group IDs with gradle.plugin. as you can see in the buildscript snippet here: https://plugins.gradle.org/plugin/name.remal.vcs-auto-version

Perhaps if you add that to your group ID, it will work.

I’d still encourage you to use plugin-publish. If there is a significant deficiency with it that we should be aware of, please let me know.


(Semen Levin) #3

I want publishing be more automated. So I’ve develop a plugin that simplifies publication a lot. For example, now I can just write this:

apply plugin: ‘name.remal.publish-maven’
publishMaven {
bintray()
gradlePluginPortal()
}

It will create tasks for publish artifacts into Bintray and Gradle Plugin portal. Plugins metadata (description, tags, etc) will be taken automatically be classes processing (I have special annotation Plugin for that). Credentials will be taken from environment variables.

I haven’t reimplement Gradle Portal client. I’ve used such classes as PublishNewVersionRequest, BuildMetadata, PublishMavenCoordinates and so on… But I don’t apply com.gradle.plugin-publish plugin.

As you can see, all requests are successfully process by Plugin portal, but plugins haven’t published…

Should I retry publish or smth is still wrong?


(Eric Wendelin) #4

I can approve all the plugins requests, but they may not be grouped as new versions of existing plugins.


(Eric Wendelin) #5

I have approved the “new” plugin group, and it looks like this all works just fine now. https://plugins.gradle.org/plugin/name.remal.vcs-operations