I am trying to prepare my project for Gradle 7, unfortunately, the build fails:
Build file '/home/flo/data/code/smack/build.gradle' line: 446
* What went wrong:
A problem occurred evaluating root project 'Smack'.
> Failed to apply plugin class 'org.gradle.api.publish.plugins.PublishingPlugin'.
> Cannot run Project.afterEvaluate(Action) when the project is already evaluated.
The line in question, 446, is
apply plugin: 'maven-publish'
and since this is an official pluging and from my interpretation of the error message, I assume it is unrelated to the maven-publish plugin. Instead, it is potentially cause by something that triggers the evaluation of the project before the plugin is applied (which has become an error with Gradle 7). If my assessment of the situation is correct, then the question is: What triggers the evaluation?
Unfortunately, my gradle foo ends here, I am stuck on how to approach/diagnose this issue. Any help is appreciated. The branch preparing of Gradle 7 is at
and a build scan of the build is available under
https://scans.gradle.com/s/363dhugbc5jhm
Any help is much appreciated. Thanks in advance.