Gradle publish-plugin fails if the artifacts are signed

gradle-3285
issue-acknowledged

(Ronald Holshausen) #1

Gradle publish-plugin fails to publish if the artefacts in the project are signed. The signing plugin generates GPG signatures for all artefacts with an asc extension, which causes the publish plugin to fail.

It would be preferable to issue a warning and ignore any unknown artefacts instead of failing, so that plugins can still be published to the plugin portal.

error message:

* What went wrong:
Execution failed for task ':pact-jvm-provider-gradle_2.11:publishPlugins'.
    > Unknown artifact type with extension "asc" and classifier ""
You can only upload normal jars, sources jars, javadoc jars and groovydoc jars
to the plugin portal at this time.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':pact-jvm-provider-gradle_2.11:publishPlugins'.
    at   org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
...
Caused by: java.lang.IllegalArgumentException: Unknown artifact type with extension "asc" and classifier ""
You can only upload normal jars, sources jars, javadoc jars and groovydoc jars
to the plugin portal at this time. 
    at com.gradle.publish.PublishTask.addAndHashArtifact(PublishTask.java:188)
    at com.gradle.publish.PublishTask.addAndHashArtifact(PublishTask.java:175)
    at com.gradle.publish.PublishTask.collectArtifacts(PublishTask.java:235)
    at com.gradle.publish.PublishTask.publish(PublishTask.java:66)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)

(Tom Dunstan) #2

Yes, we need to fix this one way or the other. Raised as GRADLE-3285. Thanks for the report!


(Jared Burrows) #3

I would really like to get this plugin: https://github.com/KeepSafe/dexcount-gradle-plugin uploaded to the plugins repo. What is the status of this bug?


(Ronald Holshausen) #4

This works now for me, even with the raised defect still marked as open. Not sure if it was fixed or a later gradle version made the condition go away.