[GRADLE-1124] When the groovy plugin is applied to a project which uses groovy only for testing, the project ends up with groovy as an unnecessary runtime dependency Created: 17/Aug/10 Updated: 15/Jan/13 Resolved: 07/Jan/13
Say I have a project which uses Groovy for testing only. At the moment, however, if I apply the 'groovy' plugin, I end up with groovy as a runtime dependency, rather than just a test dependency. Also, I end up with a bunch of tasks (compileGroovy, groovydoc) which don't do anything. Same applies for the 'scala' plugin.
It would be nice to have some way to apply a language plugin on a per-source set basis.
|Comment by Adam Murdoch [ 17/Aug/10 ]|
A workaround is to move the groovy configuration to testCompile:
|Comment by Steve Appling [ 19/Aug/10 ]|
I found that the above broke my compile because it took out the providedCompile configuration. The following works a little better:
This is fragile, however, and we really do need built in support. Perhaps a groovyTest configuration?