Package org.gradle.api.tasks
Klasse AbstractExecTask<T extends AbstractExecTask>
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.AbstractExecTask<T>
- Typparameter:
T- The concrete type of the class.
- Alle implementierten Schnittstellen:
Comparable<Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.IConventionAware,org.gradle.api.internal.TaskInternal,Named,ExtensionAware,Task,BaseExecSpec,ExecSpec,ProcessForkOptions,Configurable<Task>
- Bekannte direkte Unterklassen:
Exec,RunTestExecutable
@DisableCachingByDefault(because="Abstract super-class, not to be instantiated directly")
public abstract class AbstractExecTask<T extends AbstractExecTask>
extends org.gradle.api.internal.ConventionTask
implements ExecSpec
AbstractExecTask is the base class for all exec tasks.-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.gradle.api.Task
Task.Namer -
Feldübersicht
Von Schnittstelle geerbte Felder org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungAdds arguments for the command to be executed.Adds arguments for the command to be executed.commandLine(Iterable<?> args) Sets the full command line, including the executable to be executed plus its arguments.commandLine(Object... arguments) Sets the full command line, including the executable to be executed plus its arguments.copyTo(ProcessForkOptions target) Copies these options to the given target options.environment(String name, Object value) Adds an environment variable to the environment for this process.environment(Map<String, ?> environmentVariables) Adds some environment variables to the environment for this process.protected voidexec()executable(Object executable) Sets the name of the executable to use.getArgs()Returns the arguments for the command to be executed.Argument providers for the application.Returns the full command line, including the executable plus its arguments.The environment variables to use for the process.Returns the output stream to consume standard error from the process executing the command.protected org.gradle.process.internal.ExecActionFactoryReturns the name of the executable to use.Returns the result for the command run by this task.protected ObjectFactoryReturns the standard input stream for the process executing the command.Returns the output stream to consume standard output from the process executing the command.Returns the working directory for the process.booleanTells whether a non-zero exit value is ignored, or an exception thrown.Sets the arguments for the command to be executed.Sets the arguments for the command to be executed.voidsetCommandLine(Iterable<?> args) Sets the full command line, including the executable to be executed plus its arguments.voidsetCommandLine(Object... args) Sets the full command line, including the executable to be executed plus its arguments.voidsetCommandLine(List<String> args) Sets the full command line, including the executable to be executed plus its arguments.voidsetEnvironment(Map<String, ?> environmentVariables) Sets the environment variable to use for the process.setErrorOutput(OutputStream outputStream) Sets the output stream to consume standard error from the process executing the command.voidsetExecutable(Object executable) Sets the name of the executable to use.voidsetExecutable(String executable) Sets the name of the executable to use.setIgnoreExitValue(boolean ignoreExitValue) Sets whether a non-zero exit value is ignored, or an exception thrown.setStandardInput(InputStream inputStream) Sets the standard input stream for the process executing the command.setStandardOutput(OutputStream outputStream) Sets the output stream to consume standard output from the process executing the command.voidsetWorkingDir(File dir) Sets the working directory for the process.voidsetWorkingDir(Object dir) Sets the working directory for the process.workingDir(Object dir) Sets the working directory for the process.Von Klasse geerbte Methoden org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMappingVon Klasse geerbte Methoden org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceVon Klasse geerbte Methoden org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Konstruktordetails
-
AbstractExecTask
-
-
Methodendetails
-
getObjectFactory
-
getExecActionFactory
@Inject protected org.gradle.process.internal.ExecActionFactory getExecActionFactory() -
exec
protected void exec() -
commandLine
Sets the full command line, including the executable to be executed plus its arguments.- Angegeben von:
commandLinein SchnittstelleExecSpec- Parameter:
arguments- the command plus the args to be executed- Gibt zurück:
- this
-
commandLine
Sets the full command line, including the executable to be executed plus its arguments.- Angegeben von:
commandLinein SchnittstelleExecSpec- Parameter:
args- the command plus the args to be executed- Gibt zurück:
- this
-
args
Adds arguments for the command to be executed. -
args
Adds arguments for the command to be executed. -
setArgs
Sets the arguments for the command to be executed. -
setArgs
Sets the arguments for the command to be executed. -
getArgs
Returns the arguments for the command to be executed. Defaults to an empty list. -
getArgumentProviders
Argument providers for the application.- Angegeben von:
getArgumentProvidersin SchnittstelleExecSpec
-
getCommandLine
Returns the full command line, including the executable plus its arguments.- Angegeben von:
getCommandLinein SchnittstelleBaseExecSpec- Gibt zurück:
- The full command line, including the executable plus its arguments
-
setCommandLine
Sets the full command line, including the executable to be executed plus its arguments.- Angegeben von:
setCommandLinein SchnittstelleExecSpec- Parameter:
args- the command plus the args to be executed
-
setCommandLine
Sets the full command line, including the executable to be executed plus its arguments.- Angegeben von:
setCommandLinein SchnittstelleExecSpec- Parameter:
args- the command plus the args to be executed
-
setCommandLine
Sets the full command line, including the executable to be executed plus its arguments.- Angegeben von:
setCommandLinein SchnittstelleExecSpec- Parameter:
args- the command plus the args to be executed
-
getExecutable
Returns the name of the executable to use.- Angegeben von:
getExecutablein SchnittstelleProcessForkOptions- Gibt zurück:
- The executable.
-
setExecutable
Sets the name of the executable to use.- Angegeben von:
setExecutablein SchnittstelleProcessForkOptions- Parameter:
executable- The executable. Must not be null.
-
setExecutable
Sets the name of the executable to use.- Angegeben von:
setExecutablein SchnittstelleProcessForkOptions- Parameter:
executable- The executable. Must not be null.
-
executable
Sets the name of the executable to use.- Angegeben von:
executablein SchnittstelleProcessForkOptions- Parameter:
executable- The executable. Must not be null.- Gibt zurück:
- this
-
getWorkingDir
Returns the working directory for the process. Defaults to the project directory.- Angegeben von:
getWorkingDirin SchnittstelleProcessForkOptions- Gibt zurück:
- The working directory. Never returns null.
-
setWorkingDir
Sets the working directory for the process.- Angegeben von:
setWorkingDirin SchnittstelleProcessForkOptions- Parameter:
dir- The working directory. Must not be null.
-
setWorkingDir
Sets the working directory for the process. The supplied argument is evaluated as perProject.file(Object).- Angegeben von:
setWorkingDirin SchnittstelleProcessForkOptions- Parameter:
dir- The working directory. Must not be null.
-
workingDir
Sets the working directory for the process. The supplied argument is evaluated as perProject.file(Object).- Angegeben von:
workingDirin SchnittstelleProcessForkOptions- Parameter:
dir- The working directory. Must not be null.- Gibt zurück:
- this
-
getEnvironment
The environment variables to use for the process. Defaults to the environment of this process.- Angegeben von:
getEnvironmentin SchnittstelleProcessForkOptions- Gibt zurück:
- The environment. Returns an empty map when there are no environment variables.
-
setEnvironment
Sets the environment variable to use for the process.- Angegeben von:
setEnvironmentin SchnittstelleProcessForkOptions- Parameter:
environmentVariables- The environment variables. Must not be null.
-
environment
Adds an environment variable to the environment for this process.- Angegeben von:
environmentin SchnittstelleProcessForkOptions- Parameter:
name- The name of the variable.value- The value for the variable. Must not be null.- Gibt zurück:
- this
-
environment
Adds some environment variables to the environment for this process.- Angegeben von:
environmentin SchnittstelleProcessForkOptions- Parameter:
environmentVariables- The environment variables. Must not be null.- Gibt zurück:
- this
-
copyTo
Copies these options to the given target options.- Angegeben von:
copyToin SchnittstelleProcessForkOptions- Parameter:
target- The target options- Gibt zurück:
- this
-
setStandardInput
Sets the standard input stream for the process executing the command. The stream is closed after the process completes.- Angegeben von:
setStandardInputin SchnittstelleBaseExecSpec- Parameter:
inputStream- The standard input stream for the process. Must not be null.- Gibt zurück:
- this
-
getStandardInput
Returns the standard input stream for the process executing the command. The stream is closed after the process completes. Defaults to an empty stream.- Angegeben von:
getStandardInputin SchnittstelleBaseExecSpec- Gibt zurück:
- The standard input stream.
-
setStandardOutput
Sets the output stream to consume standard output from the process executing the command. The stream is closed after the process completes.- Angegeben von:
setStandardOutputin SchnittstelleBaseExecSpec- Parameter:
outputStream- The standard output stream for the process. Must not be null.- Gibt zurück:
- this
-
getStandardOutput
Returns the output stream to consume standard output from the process executing the command. Defaults toSystem.out.- Angegeben von:
getStandardOutputin SchnittstelleBaseExecSpec- Gibt zurück:
- The output stream
-
setErrorOutput
Sets the output stream to consume standard error from the process executing the command. The stream is closed after the process completes.- Angegeben von:
setErrorOutputin SchnittstelleBaseExecSpec- Parameter:
outputStream- The standard output error stream for the process. Must not be null.- Gibt zurück:
- this
-
getErrorOutput
Returns the output stream to consume standard error from the process executing the command. Default toSystem.err.- Angegeben von:
getErrorOutputin SchnittstelleBaseExecSpec- Gibt zurück:
- The error output stream.
-
setIgnoreExitValue
Sets whether a non-zero exit value is ignored, or an exception thrown.- Angegeben von:
setIgnoreExitValuein SchnittstelleBaseExecSpec- Parameter:
ignoreExitValue- whether a non-zero exit value is ignored, or an exception thrown- Gibt zurück:
- this
-
isIgnoreExitValue
Tells whether a non-zero exit value is ignored, or an exception thrown. Defaults tofalse.- Angegeben von:
isIgnoreExitValuein SchnittstelleBaseExecSpec- Gibt zurück:
- whether a non-zero exit value is ignored, or an exception thrown
-
getExecutionResult
Returns the result for the command run by this task. The provider has no value if this task has not been executed yet.- Gibt zurück:
- A provider of the result.
- Seit:
- 6.1
-