@groovy.transform.CompileStaticCompileStatic abstract class GroovyScriptCommand extends Script
A base class for Groovy scripts that implement commands
| Type | Name and description |
|---|---|
private AntBuilder |
antAccess to Ant via AntBuilder |
private ConsoleLogger |
consoleLogger |
private CommandDescription |
description |
private ExecutionContext |
executionContext |
ExecutionContext |
executionContext |
private FileSystemInteraction |
fileSystemInteraction |
private GradleInvoker |
gradleAllows invoking of Gradle commands |
private java.lang.String |
grailsVersionThe version of Grails being used |
private java.lang.String |
name |
private Profile |
profile |
private ProfileRepository |
profileRepository |
private SpringInvoker |
springAllows invoking of Spring Boot's CLI |
private TemplateRenderer |
templateRenderer |
private java.lang.String |
userHomeThe location of the user.home directory |
| Constructor and description |
|---|
GroovyScriptCommand
() |
| 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, 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 |
getArgs()
|
|
Map |
getArgsMap()
|
|
ExecutionContext |
getExecutionContext() |
|
GrailsConsole |
getGrailsConsole()
|
|
java.lang.String |
getGrailsEnv()
|
|
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) |
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