Building Groovy projects with Gradle

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Groovy projects with Gradle

Peter Niederwieser
Hi,

is it possible to point Gradle to the Groovy installation to use for building (compiling+testing) Groovy projects, e.g. to my own working copy of groovy-core? If yes, will this work even in cases where Gradle itself depends on another version of Groovy?

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Building Groovy projects with Gradle

Bishow
Were you able to get the solution for this ?
Please do share it !
Reply | Threaded
Open this post in threaded view
|

Re: Building Groovy projects with Gradle

Peter Niederwieser
Yes, Gradle lets you build against any Groovy version. Here is my build script:

project(":my-project") {
  dependencies {
    addMavenRepo()
    addFlatDirResolver "lib", new File("/swd/src/groovy-core/target/install/embeddable")
   
    compile ":groovy-all:1.6-beta-2-SNAPSHOT"
    compile "asm:asm:2.2.3"
    compile "junit:junit:4.4"
  }

  test {
    include "**/*Test.class"
  }
}

Explanation: I build against my svn working copy of Groovy 1.6-beta-2-SNAPSHOT, located under /swd/src/groovy-core/target/install/embeddable. Not sure if this build script adheres to current best practices but it works well with Gradle 0.3.

Cheers,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Building Groovy projects with Gradle

Bishow
Thanks Peter,
I will try with the script.