The groovy plugin makes the ‘compile’ configuration extend the ‘groovy’ configuration. This is what you’d want for projects using either all groovy source code, or using mixed source code.
But we have a pattern here where groovy is only used to write unit tests. In those cases, we don’t want the groovy jars to get pulled into the transitive runtime classpath. We end up accidentally shipping the groovy jars with our product.
I’m not sure what the clean solution to this is. Maybe a second plugin, like ‘groovyTests’ that just has testCompile.extendsFrom groovy?
My workaround is to apply the GroovyBasePlugin, then explicitly have testCompile.extendsFrom groovy.