Interface TaskCommonOptions

    • Method Detail

      • getCondition

        @Stability(Experimental)
        @Nullable
        default String getCondition()
        (experimental) 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.

      • getCwd

        @Stability(Experimental)
        @Nullable
        default String getCwd()
        (experimental) The working directory for all steps in this task (unless overridden by the step).

        Default: - process.cwd()

      • getDescription

        @Stability(Experimental)
        @Nullable
        default String getDescription()
        (experimental) The description of this build command.

        Default: - the task name

      • getEnv

        @Stability(Experimental)
        @Nullable
        default Map<String,​String> getEnv()
        (experimental) 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").

        Default: {}

      • getRequiredEnv

        @Stability(Experimental)
        @Nullable
        default List<String> getRequiredEnv()
        (experimental) 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.