T - The concrete type of the class.BaseExecSpec, ExecSpec, ProcessForkOptionsExec, RunTestExecutablepublic abstract class AbstractExecTask<T extends AbstractExecTask> extends org.gradle.api.internal.ConventionTask implements ExecSpec
AbstractExecTask is the base class for all exec tasks.Task.NamerTASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE| Constructor | Description | 
|---|---|
| AbstractExecTask(java.lang.Class<T> taskType) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| T | args(java.lang.Iterable<?> args) | Adds arguments for the command to be executed. | 
| T | args(java.lang.Object... args) | Adds arguments for the command to be executed. | 
| T | commandLine(java.lang.Iterable<?> args) | Sets the full command line, including the executable to be executed plus its arguments. | 
| T | commandLine(java.lang.Object... arguments) | Sets the full command line, including the executable to be executed plus its arguments. | 
| T | copyTo(ProcessForkOptions target) | Copies these options to the given target options. | 
| T | environment(java.lang.String name,
           java.lang.Object value) | Adds an environment variable to the environment for this process. | 
| T | environment(java.util.Map<java.lang.String,?> environmentVariables) | Adds some environment variables to the environment for this process. | 
| protected void | exec() | |
| T | executable(java.lang.Object executable) | Sets the name of the executable to use. | 
| java.util.List<java.lang.String> | getArgs() | Returns the arguments for the command to be executed. | 
| java.util.List<CommandLineArgumentProvider> | getArgumentProviders() | Argument providers for the application. | 
| java.util.List<java.lang.String> | getCommandLine() | Returns the full command line, including the executable plus its arguments. | 
| java.util.Map<java.lang.String,java.lang.Object> | getEnvironment() | The environment variables to use for the process. | 
| java.io.OutputStream | getErrorOutput() | Returns the output stream to consume standard error from the process executing the command. | 
| protected org.gradle.process.internal.ExecActionFactory | getExecActionFactory() | |
| ExecResult | getExecResult() | Returns the result for the command run by this task. | 
| java.lang.String | getExecutable() | Returns the name of the executable to use. | 
| java.io.InputStream | getStandardInput() | Returns the standard input stream for the process executing the command. | 
| java.io.OutputStream | getStandardOutput() | Returns the output stream to consume standard output from the process executing the command. | 
| java.io.File | getWorkingDir() | Returns the working directory for the process. | 
| boolean | isIgnoreExitValue() | Tells whether a non-zero exit value is ignored, or an exception thrown. | 
| T | setArgs(java.lang.Iterable<?> arguments) | Sets the arguments for the command to be executed. | 
| T | setArgs(java.util.List<java.lang.String> arguments) | Sets the arguments for the command to be executed. | 
| void | setCommandLine(java.lang.Iterable<?> args) | Sets the full command line, including the executable to be executed plus its arguments. | 
| void | setCommandLine(java.lang.Object... args) | Sets the full command line, including the executable to be executed plus its arguments. | 
| void | setCommandLine(java.util.List<java.lang.String> args) | Sets the full command line, including the executable to be executed plus its arguments. | 
| void | setEnvironment(java.util.Map<java.lang.String,?> environmentVariables) | Sets the environment variable to use for the process. | 
| T | setErrorOutput(java.io.OutputStream outputStream) | Sets the output stream to consume standard error from the process executing the command. | 
| void | setExecutable(java.lang.Object executable) | Sets the name of the executable to use. | 
| void | setExecutable(java.lang.String executable) | Sets the name of the executable to use. | 
| T | setIgnoreExitValue(boolean ignoreExitValue) | Sets whether a non-zero exit value is ignored, or an exception thrown. | 
| T | setStandardInput(java.io.InputStream inputStream) | Sets the standard input stream for the process executing the command. | 
| T | setStandardOutput(java.io.OutputStream outputStream) | Sets the output stream to consume standard output from the process executing the command. | 
| void | setWorkingDir(java.io.File dir) | Sets the working directory for the process. | 
| void | setWorkingDir(java.lang.Object dir) | Sets the working directory for the process. | 
| T | workingDir(java.lang.Object dir) | Sets the working directory for the process. | 
appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toStringconventionMapping, conventionMapping, getConventionMappingnewInputDirectory, newInputFile, newOutputDirectory, newOutputFilepublic AbstractExecTask(java.lang.Class<T> taskType)
@Inject protected org.gradle.process.internal.ExecActionFactory getExecActionFactory()
protected void exec()
public T commandLine(java.lang.Object... arguments)
commandLine in interface ExecSpecarguments - the command plus the args to be executedpublic T commandLine(java.lang.Iterable<?> args)
commandLine in interface ExecSpecargs - the command plus the args to be executedpublic T args(java.lang.Object... args)
public T args(java.lang.Iterable<?> args)
public T setArgs(java.util.List<java.lang.String> arguments)
public T setArgs(@Nullable java.lang.Iterable<?> arguments)
@Nullable @Optional @Input public java.util.List<java.lang.String> getArgs()
public java.util.List<CommandLineArgumentProvider> getArgumentProviders()
getArgumentProviders in interface ExecSpec@Internal public java.util.List<java.lang.String> getCommandLine()
getCommandLine in interface BaseExecSpecpublic void setCommandLine(java.util.List<java.lang.String> args)
setCommandLine in interface ExecSpecargs - the command plus the args to be executedpublic void setCommandLine(java.lang.Iterable<?> args)
setCommandLine in interface ExecSpecargs - the command plus the args to be executedpublic void setCommandLine(java.lang.Object... args)
setCommandLine in interface ExecSpecargs - the command plus the args to be executed@Nullable @Optional @Input public java.lang.String getExecutable()
getExecutable in interface ProcessForkOptionspublic void setExecutable(@Nullable
                          java.lang.String executable)
setExecutable in interface ProcessForkOptionsexecutable - The executable. Must not be null.public void setExecutable(java.lang.Object executable)
setExecutable in interface ProcessForkOptionsexecutable - The executable. Must not be null.public T executable(java.lang.Object executable)
executable in interface ProcessForkOptionsexecutable - The executable. Must not be null.@Internal public java.io.File getWorkingDir()
getWorkingDir in interface ProcessForkOptionspublic void setWorkingDir(java.io.File dir)
setWorkingDir in interface ProcessForkOptionsdir - The working directory. Must not be null.public void setWorkingDir(java.lang.Object dir)
Project.file(Object).setWorkingDir in interface ProcessForkOptionsdir - The working directory. Must not be null.public T workingDir(java.lang.Object dir)
Project.file(Object).workingDir in interface ProcessForkOptionsdir - The working directory. Must not be null.@Internal public java.util.Map<java.lang.String,java.lang.Object> getEnvironment()
getEnvironment in interface ProcessForkOptionspublic void setEnvironment(java.util.Map<java.lang.String,?> environmentVariables)
setEnvironment in interface ProcessForkOptionsenvironmentVariables - The environment variables. Must not be null.public T environment(java.lang.String name, java.lang.Object value)
environment in interface ProcessForkOptionsname - The name of the variable.value - The value for the variable. Must not be null.public T environment(java.util.Map<java.lang.String,?> environmentVariables)
environment in interface ProcessForkOptionsenvironmentVariables - The environment variables. Must not be null.public T copyTo(ProcessForkOptions target)
copyTo in interface ProcessForkOptionstarget - The target optionspublic T setStandardInput(java.io.InputStream inputStream)
setStandardInput in interface BaseExecSpecinputStream - The standard input stream for the process. Must not be null.@Internal public java.io.InputStream getStandardInput()
getStandardInput in interface BaseExecSpecpublic T setStandardOutput(java.io.OutputStream outputStream)
setStandardOutput in interface BaseExecSpecoutputStream - The standard output stream for the process. Must not be null.@Internal public java.io.OutputStream getStandardOutput()
 System.out.getStandardOutput in interface BaseExecSpecpublic T setErrorOutput(java.io.OutputStream outputStream)
setErrorOutput in interface BaseExecSpecoutputStream - The standard output error stream for the process. Must not be null.@Internal public java.io.OutputStream getErrorOutput()
 System.err.getErrorOutput in interface BaseExecSpecpublic T setIgnoreExitValue(boolean ignoreExitValue)
setIgnoreExitValue in interface BaseExecSpecignoreExitValue - whether a non-zero exit value is ignored, or an exception thrown@Input public boolean isIgnoreExitValue()
false.isIgnoreExitValue in interface BaseExecSpec@Internal public ExecResult getExecResult()
null if this task has not been executed yet.null if this task has not been executed yet.