Class Tasks

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
               date="2024-03-28T21:16:42.812Z")
    @Stability(Experimental)
    public class Tasks
    extends Component
    (experimental) Defines project tasks.

    Tasks extend the projen CLI by adding subcommands to it. Task definitions are synthesized into .projen/tasks.json.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        Tasks​(Project project)  
      protected Tasks​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected Tasks​(software.amazon.jsii.JsiiObjectRef objRef)  
    • Constructor Detail

      • Tasks

        protected Tasks​(software.amazon.jsii.JsiiObjectRef objRef)
      • Tasks

        protected Tasks​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • Tasks

        @Stability(Experimental)
        public Tasks​(@NotNull
                     Project project)
        Parameters:
        project - This parameter is required.
    • Method Detail

      • addEnvironment

        @Stability(Experimental)
        public void addEnvironment​(@NotNull
                                   String name,
                                   @NotNull
                                   String value)
        (experimental) Adds global environment.

        Parameters:
        name - Environment variable name. This parameter is required.
        value - Value. This parameter is required.
      • addTask

        @Stability(Experimental)
        @NotNull
        public Task addTask​(@NotNull
                            String name,
                            @Nullable
                            TaskOptions options)
        (experimental) Adds a task to a project.

        Parameters:
        name - The name of the task. This parameter is required.
        options - Task options.
      • addTask

        @Stability(Experimental)
        @NotNull
        public Task addTask​(@NotNull
                            String name)
        (experimental) Adds a task to a project.

        Parameters:
        name - The name of the task. This parameter is required.
      • removeTask

        @Stability(Experimental)
        @Nullable
        public Task removeTask​(@NotNull
                               String name)
        (experimental) Removes a task from a project.

        Parameters:
        name - The name of the task to remove. This parameter is required.
        Returns:
        The Task that was removed, otherwise undefined.
      • synthesize

        @Stability(Experimental)
        public void synthesize()
        (experimental) Synthesizes files to the project output directory.
        Overrides:
        synthesize in class Component
      • tryFind

        @Stability(Experimental)
        @Nullable
        public Task tryFind​(@NotNull
                            String name)
        (experimental) Finds a task by name.

        Returns undefined if the task cannot be found.

        Parameters:
        name - The name of the task. This parameter is required.
      • getAll

        @Stability(Experimental)
        @NotNull
        public List<Task> getAll()
        (experimental) All tasks.
      • getEnv

        @Stability(Experimental)
        @NotNull
        public Map<String,​String> getEnv()
        (experimental) Returns a copy of the currently global environment for this project.