Created
April 9, 2014 14:29
-
-
Save itzg/10277013 to your computer and use it in GitHub Desktop.
Enabling Groovy invokedynamic ("indy") support in a Gradle build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compileJava { | |
sourceCompatibility = 1.7 | |
targetCompatibility = 1.7 | |
} | |
compileGroovy { | |
groovyOptions.optimizationOptions.indy = true | |
} | |
dependencies { | |
compile 'org.codehaus.groovy:groovy-all:2.2.2:indy' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .... | |
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