This issue has manifested for me with the Gradle CodeNarc plugin reporting compilation failures for classes that use the multicatch feature introduced in Groovy 2.0. I first filed a ticket with the CodeNarc project, but now believe it to be a limitation of the Gradle plugin.
Unless it’s somehow happening magically in the injection of the IsolatedAntBuilder, my belief is that the IsolatedAntBuilder used to run CodeNarc’s ant task is using the default (the version of Groovy that Gradle is using). My expectation is that instead, it should use the version of Groovy that was declared for the configuration that is being reported against. For example, if the main and test configurations have different versions of Groovy, the codenarcMain and codenarcTest tasks should use those different versions.
If this sounds sensible, I’d be happy to work on a pull request in this direction.