Skip to content

Instantly share code, notes, and snippets.

@itzg
Created April 9, 2014 14:29
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save itzg/10277013 to your computer and use it in GitHub Desktop.
Save itzg/10277013 to your computer and use it in GitHub Desktop.
Enabling Groovy invokedynamic ("indy") support in a Gradle build
compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
compileGroovy {
groovyOptions.optimizationOptions.indy = true
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.2.2:indy'
}
// ....
def compilerConfig = new CompilerConfiguration()
compilerConfig.optimizationOptions.indy = true
def shell = new GroovyShell(compilerConfig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment