I want to run a groovy command-line script from my Gradle build script.
I\'m using this code in my Gradle script:
def groovyShell = new GroovyShell(
The alternative to do this is the following:
buildScript {
repositories { mavenCentral() }
dependencies {
classpath "commons-cli:commons-cli:1.2"
}
}
def groovyShell = new GroovyShell()
....
This puts the commons-cli dependency on the classpath of the buildscript instead of on the classpath of the project to be built.