Monday, June 3, 2019

The maven-publish plugin is incompatible with Gradle 5.1

Today I published a Java/Kotlin project to Maven Central. I did it from Gradle using the maven-publish and signing plugins using this writeup. After dealing with GPG using Bash on Ubuntu on Windows, I found that the signArchives task failed with "duplicate key" when signing the main JAR. (I previously hit the same error when trying to use the older maven plugin.) After some research I discovered that this workflow doesn't work on Gradle 5.1. Downgrading the project Gradle wrapper to 5.0 fixed the problem.

No comments:

Post a Comment