Apply plugin: 'signing' broke in gradle 5.1.1? and prints out non-existent task?

Upgraded to gradle 5.1.1 from 4.10. I get this error

  • What went wrong:
    Execution failed for task ‘:core:signArchives’.

Duplicate key core:jar.asc:asc: (attempted merging values Signature core:jar.asc:asc: and Signature core:jar.asc:asc:)

so in trying to pair down the issue, I run

./gradlew :core:signArchives

but that results in saying it doesn’t exist? Specifically “Task ‘signArchives’ not found in project ‘:core’.” I am so confused to how even to pair down the issue then. How does it exist in one run and not the other run? very weird.

I did read an issue that is for a different plugin

Mine plugin is the signing plugin from the gradle pages rather than the maven publish one…

I use a different sonatype plugin to upload to sonatype.

well, never mind, I guess the old maven plugin is broke and you MUST switch to maven-publish plugin and then it all works again. This kind of forced me to switch but leaving this remnant for the next person.

I’ve run across this issue as well and found that the problem seemed to be that the jar was added multiple times as an artifact. In my case I previously had to add the jar explicitly to the artifacts block.

artifacts {
    archives jar
    archives javadocJar
    archives sourcesJar

Removing the archive jar fixed the problem for me. It seems like it’s being added now by something else so adding it twice causes problems.

1 Like