| Modifier and Type | Method and Description |
|---|---|
Task |
build() |
Task.Builder |
condition(String condition)
(experimental) A shell command which determines if the this task should be executed.
|
static Task.Builder |
create(String name) |
Task.Builder |
cwd(String cwd)
(experimental) The working directory for all steps in this task (unless overridden by the step).
|
Task.Builder |
description(String description)
(experimental) The description of this build command.
|
Task.Builder |
env(Map<String,String> env)
(experimental) Defines environment variables for the execution of this task.
|
Task.Builder |
exec(String exec)
(experimental) Shell command to execute as the first command of the task.
|
Task.Builder |
requiredEnv(List<String> requiredEnv)
(experimental) A set of environment variables that must be defined in order to execute this task.
|
@Stability(value=Experimental) public static Task.Builder create(String name)
name - This parameter is required.Task.Builder.@Stability(value=Experimental) public Task.Builder condition(String condition)
If the program exits with a zero exit code, steps will be executed. A non-zero code means that task will be skipped.
condition - A shell command which determines if the this task should be executed. This parameter is required.this@Stability(value=Experimental) public Task.Builder cwd(String cwd)
Default: - process.cwd()
cwd - The working directory for all steps in this task (unless overridden by the step). This parameter is required.this@Stability(value=Experimental) public Task.Builder description(String description)
Default: - the task name
description - The description of this build command. This parameter is required.this@Stability(value=Experimental) public Task.Builder env(Map<String,String> env)
Values in this map will be evaluated in a shell, so you can do stuff like $(echo "foo").
Default: {}
env - Defines environment variables for the execution of this task. This parameter is required.this@Stability(value=Experimental) public Task.Builder requiredEnv(List<String> requiredEnv)
Task execution will fail if one of these is not defined.
requiredEnv - A set of environment variables that must be defined in order to execute this task. This parameter is required.this@Stability(value=Experimental) public Task.Builder exec(String exec)
Default: - add steps using `task.exec(command)` or `task.spawn(subtask)`
exec - Shell command to execute as the first command of the task. This parameter is required.thisCopyright © 2021. All rights reserved.