Package: org.gradle.api.tasks

## [Java] Class AbstractExecTask<T>

- org.gradle.api.tasks.AbstractExecTask

- All Implemented Interfaces and Traits:
    ExecSpec

      public abstract class AbstractExecTask
      extends ConventionTask

  `AbstractExecTask` is the base class for all exec tasks.

  Parameters:
    `` - The concrete type of the class.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `AbstractExecTask (Class<T> taskType)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `T` | `args(Object... args)` {@inheritDoc}
    `T` | `args(Iterable<?> args)` {@inheritDoc}
    `T` | `commandLine(Object... arguments)` {@inheritDoc}
    `T` | `commandLine(Iterable<?> args)` {@inheritDoc}
    `T` | `copyTo(ProcessForkOptions target)` {@inheritDoc}
    `T` | `environment(String name, Object value)` {@inheritDoc}
    `T` | `environment(Map<String, ?> environmentVariables)` {@inheritDoc}
    `protected void` | `exec()`
    `T` | `executable(Object executable)` {@inheritDoc}
    `List<String>` | `getArgs()` {@inheritDoc}
    `List<String>` | `getCommandLine()` {@inheritDoc}
    `Map<String, Object>` | `getEnvironment()` {@inheritDoc}
    `OutputStream` | `getErrorOutput()` {@inheritDoc}
    `protected ExecActionFactory` | `getExecActionFactory()`
    `ExecResult` | `getExecResult()` Returns the result for the command run by this task.
    `String` | `getExecutable()` {@inheritDoc}
    `InputStream` | `getStandardInput()` {@inheritDoc}
    `OutputStream` | `getStandardOutput()` {@inheritDoc}
    `File` | `getWorkingDir()` {@inheritDoc}
    `boolean` | `isIgnoreExitValue()` {@inheritDoc}
    `T` | `setArgs(Iterable<?> arguments)` {@inheritDoc}
    `void` | `setCommandLine(Iterable<?> args)` {@inheritDoc}
    `void` | `setCommandLine(Object... args)` {@inheritDoc}
    `void` | `setEnvironment(Map<String, ?> environmentVariables)` {@inheritDoc}
    `T` | `setErrorOutput(OutputStream outputStream)` {@inheritDoc}
    `void` | `setExecutable(Object executable)` {@inheritDoc}
    `T` | `setIgnoreExitValue(boolean ignoreExitValue)` {@inheritDoc}
    `T` | `setStandardInput(InputStream inputStream)` {@inheritDoc}
    `T` | `setStandardOutput(OutputStream outputStream)` {@inheritDoc}
    `void` | `setWorkingDir(Object dir)` {@inheritDoc}
    `T` | `workingDir(Object dir)` {@inheritDoc}

- - ### Constructor Detail

    - #### public AbstractExecTask(Class<T> taskType)

  - ### Method Detail

    - #### public T args(Object... args)

      {@inheritDoc}

    - #### public T args(Iterable<?> args)

      {@inheritDoc}

    - #### public T commandLine(Object... arguments)

      {@inheritDoc}

    - #### public T commandLine(Iterable<?> args)

      {@inheritDoc}

    - #### public T copyTo(ProcessForkOptions target)

      {@inheritDoc}

    - #### public T environment(String name, Object value)

      {@inheritDoc}

    - #### public T environment(Map<String, ?> environmentVariables)

      {@inheritDoc}

    - #### @TaskAction protected void exec()

    - #### public T executable(Object executable)

      {@inheritDoc}

    - #### public List<String> getArgs()

      {@inheritDoc}

    - #### public List<String> getCommandLine()

      {@inheritDoc}

    - #### public Map<String, Object> getEnvironment()

      {@inheritDoc}

    - #### public OutputStream getErrorOutput()

      {@inheritDoc}

    - #### @Inject protected ExecActionFactory getExecActionFactory()

    - #### public ExecResult getExecResult()

      Returns the result for the command run by this task. Returns `null` if this task has not been executed yet.

      Returns:
        The result. Returns `null` if this task has not been executed yet.

    - #### public String getExecutable()

      {@inheritDoc}

    - #### public InputStream getStandardInput()

      {@inheritDoc}

    - #### public OutputStream getStandardOutput()

      {@inheritDoc}

    - #### public File getWorkingDir()

      {@inheritDoc}

    - #### public boolean isIgnoreExitValue()

      {@inheritDoc}

    - #### public T setArgs(Iterable<?> arguments)

      {@inheritDoc}

    - #### public void setCommandLine(Iterable<?> args)

      {@inheritDoc}

    - #### public void setCommandLine(Object... args)

      {@inheritDoc}

    - #### public void setEnvironment(Map<String, ?> environmentVariables)

      {@inheritDoc}

    - #### public T setErrorOutput(OutputStream outputStream)

      {@inheritDoc}

    - #### public void setExecutable(Object executable)

      {@inheritDoc}

    - #### public T setIgnoreExitValue(boolean ignoreExitValue)

      {@inheritDoc}

    - #### public T setStandardInput(InputStream inputStream)

      {@inheritDoc}

    - #### public T setStandardOutput(OutputStream outputStream)

      {@inheritDoc}

    - #### public void setWorkingDir(Object dir)

      {@inheritDoc}

    - #### public T workingDir(Object dir)

      {@inheritDoc}