Gradle Task: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


* [[Gradle_Concepts#Task|Gradle Concepts]]
* [[Gradle_Concepts#Task|Gradle Concepts]]
=Overview=
=Task API=
=Task API=
{{External|[https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html org.gradle.api.Task]}}
{{External|[https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html org.gradle.api.Task]}}

Revision as of 22:22, 3 October 2020

External

Internal

Overview

Task API

org.gradle.api.Task

Overview

With no plugins, a build has a small set of built-in tasks.

Each plugin typically adds more.

Custom tasks can be added in build.gradle or script plugins.

Task Name

Define task name constraints. A dash is not allowed.

Task Structure

Task Configuration Closure

Task Action

Task Action Closure

Task action closures can be used to define custom simple tasks, in-line in build.gradle or in a script plugin.

@TaskAction

Task Dependency

Custom Tasks

Extending Gradle with Custom Tasks

TO DEPLETE

Gradle Task TODEPLETE