Is the groovy plugin (apply plugin: ‘groovy’) supposed to compile Groovy code in src/main/groovy requiring Java code compiled from src/main/java in the classpath?
I mean, suppose I have: src/main/java/ClassA.java src/main/groovy/ClassB.groovy
If ClassB imports and uses ClassA, is Gradle supposed to build this project correctly? Or am I forced to put ClassA in src/main/groovy in this case?
I would expect that the standard Java compiler compiles src/main/java/ClassA.java (unless it requires any class from src/main/groovy, of course), while the Groovy compiler, which is run after the Java compiler, compiles the Groovy code in src/main/groovy having the result of the javac compilation from the previous step in the compile classpath.
However, I find myself in a situation in which the Groovy compilation of ClassB fails because it can’t resolve ClassA, which has been compiled immediately before.
Thanks in advance, Mauro.