I just recently upgraded a Grails 2 plugin to Grails 4 and that gave me a weird problem that probably also applies to Grails 4 applications.
Every time I ran ./gradlew check
with gradle-clover-plugin (OpenClover) enabled, then I would get compile errors (“unable to resolve class” for /grails-app/**/*.groovy
) during compileIntegrationTestGroovy.
After endless trial-and-error, I realised that I had to delete the /src/main/java
even though it was empty!!!
I had already copied all the content from /src/main/java
to /src/main/groovy
during the upgrade process, but forgot to delete the /src/main/java
folder.