You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reason: Task ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication' uses this output of task ':gradle-license-plugin:dokkaJavadocJar' without declaring an explicit or implicit dependency.
#536
Closed
jaredsburrows opened this issue
Mar 14, 2023
· 3 comments
· Fixed by #543
Reason: Task ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication' uses this output of task ':gradle-license-plugin:dokkaJavadocJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Versions used:
libs.versions.toml
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.24.0" }
plugin-publish = { id = "com.gradle.plugin-publish", version = "1.1.0" } # works with `0.21.0`
> Task :gradle-license-plugin:generateMetadataFileForPluginMavenPublication FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication' (type 'GenerateModuleMetadata').
- Gradle detected a problem with the following location: '/Users/<>/repo/gradle-license-plugin/gradle-license-plugin/build/libs/gradle-license-plugin-javadoc.jar'.
Reason: Task ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication' uses this output of task ':gradle-license-plugin:dokkaJavadocJar' 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 ':gradle-license-plugin:dokkaJavadocJar' as an input of ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication'.
2. Declare an explicit dependency on ':gradle-license-plugin:dokkaJavadocJar' from ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication' using Task#dependsOn.
3. Declare an explicit dependency on ':gradle-license-plugin:dokkaJavadocJar' from ':gradle-license-plugin:generateMetadataFileForPluginMavenPublication' using Task#mustRunAfter.
Please refer to https://docs.gradle.org/8.0.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
15 actionable tasks: 12 executed, 2 from cache, 1 up-to-date
Watched directory hierarchies: [/Users/<>/repo/gradle-license-plugin]
Publishing build scan...
https://gradle.com/s/ugtx3alhw4yma
The text was updated successfully, but these errors were encountered:
I need to take a closer look but this is probably an issue in either Gradle or com.gradle.plugin-publish. We are creating dokkaJavadocJar in this plugin but we are then just passing it to MavenPublication.artifact and let Gradle take care of the rest. So Gradle should be registering the task dependency from any publishing task that it creates to dokkaJavadocJar.
#542 let me to the right direction and I've got a fix for this issue. There should be a new release very soon. One workaround until then would be to use the base plugin and skip making the configure(...) call in our extension.
When trying to update gradle-license-plugin, I am seeing the following error.
Versions used:
libs.versions.toml
gradle.properties
Repro:
Full Error:
The text was updated successfully, but these errors were encountered: