Groovy++ With Gradle
I’ve been playing with Groovy++ a bit. It’s evolving very fast, so it can be a pain to keep up to date. Besides, I tend to use Gradle for build. I figure I’ll let Gradle take care of this.
As it turn out, it was very easy to do so. Here is my build.gradle. You can use it to play around with groovy++ to see if it fits your need.
apply {
plugin 'groovy'
}
group = 'com.example'
version = '1.0.0'
repositories {
mavenCentral()
mavenRepo urls: "http://groovypp.artifactoryonline.com/groovypp/libs-releases-local"
}
dependencies {
groovy 'org.mbte.groovypp:groovypp-all:0.2.24'
}
task copyToLib(dependsOn: configurations.default.buildArtifacts, type: Copy) {
into('build/lib')
from configurations.default
from configurations.default.allArtifacts*.file
}
It will grab the most recent release and use it to build and run all groovy files. I also have my standard copyToLib task to copy all jars into build/lib.
September 25th, 2010 in
M Hacks


what is the different between .default. and .runtime. for the configurations object?
I have the same basic copyLibs task, but I use configurations.runtime
default has both runtime and archive. More info at http://gradle.org/0.8/docs/userguide/java_plugin.html#sec:java_plugin_and_dependency_management