Java (9+) Module + Groovy Compile failure

Answered

I am creating a JAVA project using JAVA 9+ Modules that also have Groovy classes in it; Gradle manage to compile Groovy classes and Java classes and package them all in the resulting modular JAR.

 

When I try to compile the project using IntelliJ I get the error:

Error:(1, 1) java: file should be on source path, or on patch path for module

 

I get the same error when I try to compile the module-info.java file using the groovy compiler (found this out in one of the many gradle configuration tries).

 

Is there a way to configure IntelliJ so it only compiles .groovy files with the Groovy compiler?

 

Next is an image with a test project structure and the resulting error.

Thanks in advance for any guidance.

 

-Daniel

0
1 comment

 

Please follow this issue for updates: https://youtrack.jetbrains.com/issue/IDEA-199948. As a workaround enable File | Settings | Build, Execution, Deployment | Build Tools | Gradle | Runner | Delegate IDE build/run actions to gradle option.

0

Please sign in to leave a comment.