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 org.gradle.api.internal.ConventionTask

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

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

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class org.gradle.api.internal.ConventionTask` | `TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION`
    `class DefaultTask` | `TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION`

  - ### 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 org.gradle.process.internal.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}

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.gradle.api.internal.ConventionTask` | `org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, groovy.lang.Closure), org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getConventionMapping(), org.gradle.api.internal.ConventionTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.ConventionTask#toString(), org.gradle.api.internal.ConventionTask#compareTo(java.lang.Object), org.gradle.api.internal.ConventionTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.ConventionTask#getName(), org.gradle.api.internal.ConventionTask#getActions(), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#setName(java.lang.String), org.gradle.api.internal.ConventionTask#getPath(), org.gradle.api.internal.ConventionTask#getExtensions(), org.gradle.api.internal.ConventionTask#getLogger(), org.gradle.api.internal.ConventionTask#execute(), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getDescription(), org.gradle.api.internal.ConventionTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#isEnabled(), org.gradle.api.internal.ConventionTask#property(java.lang.String), org.gradle.api.internal.ConventionTask#setEnabled(boolean), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#hasProperty(java.lang.String), org.gradle.api.internal.ConventionTask#getConvention(), org.gradle.api.internal.ConventionTask#setDescription(java.lang.String), org.gradle.api.internal.ConventionTask#getGroup(), org.gradle.api.internal.ConventionTask#setGroup(java.lang.String), org.gradle.api.internal.ConventionTask#dependsOnTaskDidWork(), org.gradle.api.internal.ConventionTask#getInputs(), org.gradle.api.internal.ConventionTask#getTemporaryDir(), org.gradle.api.internal.ConventionTask#mustRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setMustRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getMustRunAfter(), org.gradle.api.internal.ConventionTask#finalizedBy([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setFinalizedBy(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getFinalizedBy(), org.gradle.api.internal.ConventionTask#shouldRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setShouldRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getShouldRunAfter(), org.gradle.api.internal.ConventionTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setDidWork(boolean), org.gradle.api.internal.ConventionTask#getDidWork(), org.gradle.api.internal.ConventionTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doLast(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doLast(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#deleteAllActions(), org.gradle.api.internal.ConventionTask#getEnabled(), org.gradle.api.internal.ConventionTask#getAnt(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#setActions(java.util.List), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getDependsOn(), org.gradle.api.internal.ConventionTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.ConventionTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#getProject(), org.gradle.api.internal.ConventionTask#getStandardOutputCapture(), org.gradle.api.internal.ConventionTask#getAsDynamicObject(), org.gradle.api.internal.ConventionTask#getTaskActions(), org.gradle.api.internal.ConventionTask#getOnlyIf(), org.gradle.api.internal.ConventionTask#executeWithoutThrowingTaskFailure(), org.gradle.api.internal.ConventionTask#getExecuter(), org.gradle.api.internal.ConventionTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.ConventionTask#getValidators(), org.gradle.api.internal.ConventionTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.ConventionTask#setProject(org.gradle.api.Project), org.gradle.api.internal.ConventionTask#getImpliesSubProjects(), org.gradle.api.internal.ConventionTask#setImpliesSubProjects(boolean), org.gradle.api.internal.ConventionTask#getTemporaryDirFactory(), org.gradle.api.internal.ConventionTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#wait(long, int), org.gradle.api.internal.ConventionTask#wait(long), org.gradle.api.internal.ConventionTask#wait(), org.gradle.api.internal.ConventionTask#equals(java.lang.Object), org.gradle.api.internal.ConventionTask#hashCode(), org.gradle.api.internal.ConventionTask#getClass(), org.gradle.api.internal.ConventionTask#notify(), org.gradle.api.internal.ConventionTask#notifyAll()`
    `class DefaultTask` | `setProperty, toString, compareTo, compareTo, getName, getActions, getState, getState, setName, getPath, getExtensions, getLogger, execute, configure, configure, getDescription, leftShift, isEnabled, property, setEnabled, getLogging, getLogging, hasProperty, getConvention, setDescription, getGroup, setGroup, dependsOnTaskDidWork, getInputs, getTemporaryDir, mustRunAfter, setMustRunAfter, getMustRunAfter, finalizedBy, setFinalizedBy, getFinalizedBy, shouldRunAfter, setShouldRunAfter, getShouldRunAfter, setOnlyIf, setOnlyIf, setDidWork, getDidWork, doFirst, doFirst, doLast, doLast, deleteAllActions, getEnabled, getAnt, getOutputs, getOutputs, setActions, getTaskDependencies, getTaskDependencies, getDependsOn, setDependsOn, dependsOn, onlyIf, onlyIf, getProject, getStandardOutputCapture, getAsDynamicObject, getTaskActions, getOnlyIf, executeWithoutThrowingTaskFailure, getExecuter, setExecuter, getValidators, addValidator, setProject, getImpliesSubProjects, setImpliesSubProjects, getTemporaryDirFactory, injectIntoNewInstance, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll`

- - ### 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}

    - #### @javax.inject.Inject protected org.gradle.process.internal.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}