docs.gradle.org

All Superinterfaces:
Collection<Task>, Configurable<NamedDomainObjectContainer<Task>>, DomainObjectCollection<Task>, DomainObjectSet<Task>, Iterable<Task>, NamedDomainObjectCollection<Task>, NamedDomainObjectContainer<Task>, NamedDomainObjectSet<Task>, PolymorphicDomainObjectContainer<Task>, Set<Task>, TaskCollection<Task>

  • Method Details

    • findByPath

    • getByPath

    • create

      Deprecated.

      Creates a Task and adds it to this container. A map of creation options can be passed to this method to control how the task is created. The following options are available:

      Permitted map keys
      OptionDescriptionDefault Value
      "name"The name of the task to create.None. Must be specified.
      "type"The class of the task to create.DefaultTask
      "action"The closure or Action to execute when the task executes. See Task.doFirst(Action).null
      "overwrite"Replace an existing task?false
      "dependsOn"The dependencies of the task. See here for more details.[]
      "group"The group of the task.null
      "description"The description of the task. null
      "constructorArgs"The arguments to pass to the task class constructor. null

      After the task is added, it is made available as a property of the project, so that you can reference the task by name in your build file.

      If a task with the given name already exists in this container and the "overwrite" option is not set to true, an exception is thrown.

      Parameters:
      options - The task creation options.
      Returns:
      The newly created task object
      Throws:
      InvalidUserDataException - If a task with the given name already exists in this project.
      NullPointerException - If any of the values in "constructorArgs" is null.
      See Also:
    • create

    • create

    • create

    • create

    • create

    • create

    • create

    • register

    • register

    • register

    • register

    • register

    • replace

    • replace

Read the original on docs.gradle.org ↗