We have just upgraded to gradle 8. Inside Intellij it has started to invoke a target that I didn’t know existed and it fails. It is a humungus build script that starts 6 different services. It is still not properly fixed for migration to gradle 9.
What I am interested in to know is what can create these services that is the problem?
Is there a some general bad practice that causes multiple instances of that services?
And finally a question that is not related to gradle. Can I disable that task in intellij?
$ gr ecodex.ci:generateGradleLintReport
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
[Incubating] Problems report is available at: file:///home/johan/git/teamDelivery/ecodex/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':ecodex.ci'.
> Could not create task ':ecodex.ci:generateGradleLintReport'.
> Could not create task of type 'GradleLintReportTask'.
> Could not create an instance of type org.gradle.api.plugins.quality.internal.CodeNarcReportsImpl.
> Multiple services of type Describable available in project services:
- Service ConfigurationContainerInternal
- Service ProjectInternal with implementation DefaultProject_Decorated
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.11.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 3s
2 actionable tasks: 2 up-to-date
johan@jimbo:~/git/teamDelivery/ecodex$
and
$ gr --version
------------------------------------------------------------
Gradle 8.11.1
------------------------------------------------------------
Build time: 2024-11-20 16:56:46 UTC
Revision: 481cb05a490e0ef9f8620f7873b83bd8a72e7c39
Kotlin: 2.0.20
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM: 11.0.26 (Ubuntu 11.0.26+4-post-Ubuntu-1ubuntu124.10)
Daemon JVM: /usr/lib/jvm/java-11-openjdk-amd64 (no JDK specified, using current Java home)
OS: Linux 6.11.0-14-generic amd64