Gradle 5.6 includes two new features that accelerate Groovy compilation.
Groovy compilation avoidance
Gradle now supports experimental compilation avoidance for Groovy. This speeds up Groovy compilation by avoiding re-compiling dependent projects if there are no changes that would affect the output of their compilation. See Groovy compilation avoidance for more details.
Incremental Groovy compilation
Even if recompilation is necessary, Gradle now has experimental support for incremental Groovy compilation. If only a small set of Groovy source files are changed, only the affected source files will be recompiled. For example, if you only change a few Groovy test classes, you don't need to recompile all Groovy test source files - only the changed classes (and the classes that are affected by them) will need to be recompiled. See Incremental Groovy compilation in the user manual for more details.