4

While creating some tasks in the build.gradle of a project I found very difficult to know which type the task should be.

Is there any reference guide indicating what kind of tasks exist and when to use every one of them?

P.S.: On the link referenced above I did not find this info.

lealceldeiro
  • 14,342
  • 6
  • 49
  • 80
  • 1
    I'm not sure I understand your question. The left menu on the page you linked to has a list of task types provided by gradle. Each additional plugin of course also brings additional task types. The user guide covers each and every core gradle plugin, with all its tasks: https://docs.gradle.org/4.2/userguide/userguide.html. It's quite hard to miss. Is that what you're looking for? – JB Nizet Sep 27 '17 at 19:55
  • 1
    See: https://docs.gradle.org/current/dsl/org.gradle.api.Task.html and look for TaskTypes on the left-hand side. No one can say when to use a particular task. e.g., unless you need to run Antlr, you probably don't need an implementation of AntlrTask –  Sep 27 '17 at 20:00

1 Answers1

1

In the Gradle official documentation website, the tasks are located at the left panel under a "Core type" heading like this:

enter image description here

In addition to this, every new plugin (third party) you add to your project can add new tasks (which are available on your build.gradle) that are not listed in the above list, and should be documented in the website of the plugin.

About when the use every one of them, it depends on what you need to do. Every task on the list has a link with the corresponding documentation. i.e., in the image above if you click on the Setting task it leads you to its documentation. This way you can determine whether the task is useful to what you need to do or not.

lealceldeiro
  • 14,342
  • 6
  • 49
  • 80