-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
a:bughas:workaroundIndicates that the issue has a workaroundIndicates that the issue has a workaroundin:signing-plugin
Description
Current Behavior
Publication fails with:
> Task :signJvmPublication FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':signJvmPublication' (type 'Sign').
- Gradle detected a problem with the following location: '/Users/arkivanov/dev/workspace/api-validator-issue/build/libs/publish-issue-0.0.1-javadoc.jar.asc'.
Reason: Task ':publishJsPublicationToMavenLocal' uses this output of task ':signJvmPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':signJvmPublication' as an input of ':publishJsPublicationToMavenLocal'.
2. Declare an explicit dependency on ':signJvmPublication' from ':publishJsPublicationToMavenLocal' using Task#dependsOn.
3. Declare an explicit dependency on ':signJvmPublication' from ':publishJsPublicationToMavenLocal' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.2.1/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
Expected Behavior
No errors and artifacts uploaded.
Context (optional)
This started to happen after upgrade to from Gradle 7.5
to 8.2.1
. I'm not sure yet if it's only related to KMP projects. There is a discussion of this issue in KT-46466, but the ticket has been closed as "Third Party Problem".
One of the suggested workaround:
val signingTasks = tasks.withType<Sign>()
tasks.withType<AbstractPublishToMaven>().configureEach {
dependsOn(signingTasks)
}
Steps to Reproduce
- Extract the reproducer: publish-issue.zip
cd
into the directoryexport SIGNING_KEY=$(cat <path to some private key armored ascii>)
export SIGNING_PASSWORD=<password for the key>
./gradlew publishToMavenLocal
Gradle version
8.2.1
Build scan URL (optional)
https://gradle.com/s/xhbyr2vn27rpu
Your Environment (optional)
macOS Ventura 13.5
openjdk 17.0.8 2023-07-18
amal, LouisCAD, martinbonnin, svenjacobs, alshan and 19 more
Metadata
Metadata
Assignees
Labels
a:bughas:workaroundIndicates that the issue has a workaroundIndicates that the issue has a workaroundin:signing-plugin