Circular dependency between testCompiler tasks

I have three test folders for scala, groovy and Java.

In Java, I have a class that has a dependency on groovy and in groovy I have a class that has a dependency on Scala.

So, I add this dependency relation in the gradle assembly file:

 compileTestGroovy.dependsOn compileTestScala
 compileTestJava.dependsOn compileTestGroovy

But I get this error on Gradle

   Circular dependency between the following tasks:
:compileTestGroovy
+--- :compileTestJava
|    \--- :compileTestGroovy (*)
\--- :compileTestScala
     \--- :compileTestJava (*)

(*) - details omitted (listed previously)

Any idea what I'm doing wrong?

Hi

+4
source share
1 answer

You need to use collaborative compilation, which essentially means you need to combine the sources. From the docs:

[...] Groovy, Groovy Java, Java- ( ). , Groovy Java . , Groovy Java , , Groovy. , .

+1

Source: https://habr.com/ru/post/1656392/


All Articles