Package io.github.cdklabs.projen
Class TaskCommonOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.TaskCommonOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TaskCommonOptions>
- Enclosing interface:
- TaskCommonOptions
@Stability(Experimental) public static final class TaskCommonOptions.Builder extends Object implements software.amazon.jsii.Builder<TaskCommonOptions>
A builder forTaskCommonOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskCommonOptionsbuild()Builds the configured instance.TaskCommonOptions.Buildercondition(String condition)Sets the value ofTaskCommonOptions.getCondition()TaskCommonOptions.Buildercwd(String cwd)Sets the value ofTaskCommonOptions.getCwd()TaskCommonOptions.Builderdescription(String description)Sets the value ofTaskCommonOptions.getDescription()TaskCommonOptions.Builderenv(Map<String,String> env)Sets the value ofTaskCommonOptions.getEnv()TaskCommonOptions.BuilderrequiredEnv(List<String> requiredEnv)Sets the value ofTaskCommonOptions.getRequiredEnv()
-
-
-
Method Detail
-
condition
@Stability(Experimental) public TaskCommonOptions.Builder condition(String condition)
Sets the value ofTaskCommonOptions.getCondition()- Parameters:
condition- A shell command which determines if the this task should be executed. If the program exits with a zero exit code, steps will be executed. A non-zero code means that task will be skipped.- Returns:
this
-
cwd
@Stability(Experimental) public TaskCommonOptions.Builder cwd(String cwd)
Sets the value ofTaskCommonOptions.getCwd()- Parameters:
cwd- The working directory for all steps in this task (unless overridden by the step).- Returns:
this
-
description
@Stability(Experimental) public TaskCommonOptions.Builder description(String description)
Sets the value ofTaskCommonOptions.getDescription()- Parameters:
description- The description of this build command.- Returns:
this
-
env
@Stability(Experimental) public TaskCommonOptions.Builder env(Map<String,String> env)
Sets the value ofTaskCommonOptions.getEnv()- Parameters:
env- Defines environment variables for the execution of this task. Values in this map will be evaluated in a shell, so you can do stuff like$(echo "foo").- Returns:
this
-
requiredEnv
@Stability(Experimental) public TaskCommonOptions.Builder requiredEnv(List<String> requiredEnv)
Sets the value ofTaskCommonOptions.getRequiredEnv()- Parameters:
requiredEnv- A set of environment variables that must be defined in order to execute this task. Task execution will fail if one of these is not defined.- Returns:
this
-
build
@Stability(Experimental) public TaskCommonOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TaskCommonOptions>- Returns:
- a new instance of
TaskCommonOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-