@groovy.transform.CompileStatic abstract class GroovyScriptCommand extends groovy.lang.Script
A base class for Groovy scripts that implement commands
| Type | Name and description | 
|---|---|
| groovy.util.AntBuilder | antAccess to Ant via AntBuilder | 
| ConsoleLogger | consoleLogger | 
| CommandDescription | description | 
| ExecutionContext | executionContext | 
| FileSystemInteraction | fileSystemInteraction | 
| GradleInvoker | gradleAllows invoking of Gradle commands | 
| java.lang.String | grailsVersionThe version of Grails being used | 
| java.lang.String | name | 
| Profile | profile | 
| ProfileRepository | profileRepository | 
| SpringInvoker | springAllows invoking of Spring Boot's CLI | 
| TemplateRenderer | templateRenderer | 
| java.lang.String | userHomeThe location of the user.home directory | 
| Type Params | Return Type | Name and description | 
|---|---|---|
|  | void | description(java.lang.String desc, java.lang.String usage)Provides a description for the command | 
|  | void | description(java.lang.String desc, groovy.lang.Closure detail)Provides a description for the command | 
|  | java.lang.Object | flag(java.lang.String name)Obtains details of the given flag if it has been set by the user | 
|  | java.util.List<java.lang.String> | getArgs()@return The arguments as a list of strings | 
|  | java.util.Map<java.lang.String, java.lang.Object> | getArgsMap()@return The undeclared command line arguments | 
|  | ExecutionContext | getExecutionContext() | 
|  | GrailsConsole | getGrailsConsole()@return The GrailsConsole instance | 
|  | java.lang.String | getGrailsEnv()@return The name of the current Grails environment | 
|  | boolean | handle(ExecutionContext executionContext)Implementation of the handle method that runs the script | 
|  | java.lang.Object | methodMissing(java.lang.String name, java.lang.Object args)Method missing handler used to invoke other commands from a command script | 
|  | void | setExecutionContext(ExecutionContext executionContext) | 
| Methods inherited from class | Name | 
|---|---|
| class groovy.lang.Script | groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(long), groovy.lang.Script#wait(), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll() | 
| class groovy.lang.GroovyObjectSupport | groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() | 
Access to Ant via AntBuilder
Allows invoking of Gradle commands
The version of Grails being used
Allows invoking of Spring Boot's CLI
The location of the user.home directory
Provides a description for the command
desc -  The descriptionusage -  The usage informationProvides a description for the command
desc -  The descriptionusage -  The usage informationObtains details of the given flag if it has been set by the user
name -  The name of the flag
Implementation of the handle method that runs the script
executionContext -  The ExecutionContextMethod missing handler used to invoke other commands from a command script
name -  The name of the command as a method name (for example 'run-app' would be runApp())args -  The arguments to the command