The use case is important to us, but we don’t want to solve it using a providedCompile configuration.
Instead, we will get rid of the special groovy configuration, and you will declare groovy as a regular dependency. The groovy plugin will find it in the appropriate compile or testCompile configuration, and do the right thing based on where it finds it.
For example, if I declare:
then the groovy plugin will use ‘org.codehaus:groovy:1.8.5’ as the implementation to use for ‘compileGroovy’, ‘compileTestGroovy’, ‘groovyDoc’, ‘test’ and so on. It will also end up in the generated ivy.xml or pom.xml, in the IDE class path, and so on.
If I have a project that uses groovy only for testing, then I would do this, instead:
then, the groovy plugin will use groovy as a dependency only for test compilation and execution. Groovy would not end up in the generated ivy.xml or pom.xml, or the IDE compile class path.