I am wondering what people's approach is to build Groovy libraries with Gradle. Most people will probably use something like

   dependencies {
        compile 'org.codehaus.groovy:groovy-all:2.4.7'
   }

which will set the appropriate Groovy version as a dependency. This can obvisously lead to some interestign Groovy version resslution when combining multiple libraires with different Groovy versions as dependencies.

For a number of projects I have worked on, I have adopted the 'provided' scope via the Nebula plugin, or since 'compileOnly' has become available in Gradle defaulted to that i.e.

   dependencies {
        compileOnly 'org.codehaus.groovy:groovy-all:2.4.7'
   }

This obviously means that the consumer of one of my Groovy libraries has to explicitly state which version of Groovy they require, but IMO it is better that way as it gives them more control.

Thoughts?

--
Schalk W. Cronjé
Twitter / Ello / Toeter : @ysb33r

Reply via email to