Base task class to wrap external tool executions without exposing command-line parameters directly.
T
is the execution specification class
E
is the extension class type that allows for configuration of the external tool.
Modifiers | Name | Description |
---|---|---|
protected ProjectOperations |
projectOperations |
ProjectOperations instance that can be utilised within the task hierarchy |
Type | Name and description |
---|---|
java.util.Map<String, ?> |
environment |
Constructor and description |
---|
protected AbstractExecWrapperTask
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected T |
addEnvironmentToExecSpec(T execSpec) Adds the configured environment to the execution specification. |
|
protected T |
addExecutableToExecSpec(T execSpec) Adds the exe to the execution specification. |
|
protected T |
configureExecSpec(T execSpec) Configures an execution specification from task properties |
|
protected T |
createExecSpec() Creates a new execution specification. |
|
void |
environment(java.util.Map<String, ?> args) Add environmental variables to be passed to the exe. |
|
void |
exec() The default implementation will build an execution specification and run it. |
|
java.util.Map<String, String> |
getEnvironment() Environment for running the exe |
|
protected E |
getToolExtension() Returns the extension that is associated with the specific tool |
|
protected ExecResult |
runExecSpec(T execSpec) |
|
void |
setEnvironment(java.util.Map<String, ?> args) Replace current environment with new one. |
ProjectOperations instance that can be utilised within the task hierarchy
Adds the configured environment to the execution specification.
Adds the exe to the execution specification.
Configures an execution specification from task properties
Creates a new execution specification.
Add environmental variables to be passed to the exe.
args
- Environmental variable key-value map.The default implementation will build an execution specification and run it.
Environment for running the exe
Calling this will resolve all lazy-values in the variable map.
Returns the extension that is associated with the specific tool
Replace current environment with new one.
args
- New environment key-value map of properties.Groovy Documentation