Skip to content

Instantly share code, notes, and snippets.

@kaikousa
Created March 14, 2013 14:46
Show Gist options
  • Save kaikousa/5161915 to your computer and use it in GitHub Desktop.
Save kaikousa/5161915 to your computer and use it in GitHub Desktop.
A Gradle script for running a Groovy-script that has dependencies (Jedis used for example).
apply plugin: 'groovy'
buildscript {
repositories { mavenCentral() }
dependencies {
classpath "redis.clients:jedis:2.0.0"
}
}
repositories {
mavenCentral()
}
dependencies {
groovy "org.codehaus.groovy:groovy-all:2.0.5"
compile 'org.codehaus.groovy:groovy-all:2.0.5'
compile "redis.clients:jedis:2.0.0"
}
task run << {
new GroovyShell(buildscript.classLoader).run(file('src/main/groovy/TestRedis.groovy'))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment