Over a million developers have joined DZone.

Sending Out an SOS for a Task in Gradle

DZone's Guide to

Sending Out an SOS for a Task in Gradle

Learn how to use the help task in Gradle to get more information about specific tasks.

· DevOps Zone
Free Resource

“Automated Testing: The Glue That Holds DevOps Together” to learn about the key role automated testing plays in a DevOps workflow, brought to you in partnership with Sauce Labs.

To see which tasks are available for a Gradle project we can invoke the tasks task. With this task all tasks are printed to the console with their description. To get more information about a specific task we can use the Gradle help task with the command-line option --task followed by the task name. Gradle prints out the path, type, description, group and optional options for the task.

Let's run the help task for the wrapper task:

$ gradle help --task wrapper                   
Detailed task information for wrapper


     Wrapper (org.gradle.api.tasks.wrapper.Wrapper)

     --gradle-distribution-url     The URL to download the gradle distribution from.

     --gradle-version     The version of the Gradle distribution required by the wrapper.

     Generates Gradle wrapper files. [incubating]

     Build Setup


Total time: 0.568 secs

Or use the help task to get more information about the help task:

$ gradle -q help --task help
Detailed task information for help


     Help (org.gradle.configuration.Help)

     --task     The task to show help for.

     Displays a help message.


Written with Gradle 2.7.

Learn about the importance of automated testing as part of a healthy DevOps practice, brought to you in partnership with Sauce Labs.

gradle ,devops ,build automation ,build management ,task runner

Published at DZone with permission of Hubert Klein Ikkink, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}