Plugins You can find out about all the publicly available Grails plugins.

Gscripting Plugin

2 votes
Dependency:
runtime "org.grails.plugins:gscripting:0.0.4"

 Documentation  Source  Issues

Summary

Run Groovy scripts in Grails

Installation

runtime ':gscripting:0.0.5'

Description

Create a script and run it

def gscriptingService
…
def sre = gscriptingService.createScriptRuntimeEnv("Foo", '''
process([c:"hello", d:"world"]) {
    // call another service like app.fooService.bar();
    log.info("callParams: "+ctx.callParams);
    log.info("scriptParams: "+scriptParams);
    log.debug("metadata: "+ctx.metadata);  3 + 4 + 2
}
''')
sre.run([a:23, b:42]) // or simple sre.run()
See documentation for more examples and features: https://github.com/frnktrgr/grails-gscripting/tree/grails2