So the change to compile different languages to different directories is quite a major breaking change for Grails when compiling Groovy code. For the moment we have asked users to disable that feature whilst we try and move forward with it.
However I am confused as to how we can move forward with supporting this in a way that is compatible with Gradle 3.x. Basically the error suggests we should use
setTestClassesDirs(FileCollection) instead, but this method doesn’t exist for Gradle 3.x so doing this would mean a plugin is no longer binary compatible.
In addition there seems to be several breaking problems with regards to source sets. For example in the Grails plugin we create an
integrationTest task to run integration tests. This was previously done via:
SourceSet integrationTest = sourceSets.create("integrationTest") ... File outputDir = integrationTest.output.classesDir integrationTestTask.setTestClassesDir(outputDir)
The value of
outputDir in Gradle 4.x is
build/classes/java/main whilst the code gets compiled to
build/classes/groovy/integrationTest. This means that with Gradle for these tests no longer run. How do I obtain the correct
outputDir value in a portable way that is also compatible with Gradle 3.x?