How to provide the usage information for a task

(Nathan Gutzmann) #1

I see that it is possible to query the usage for a task using the gradle command line as described in section 11.6.3 of For custom tasks/plugins that I write how do I provide this information to gradle so that I can reuse this functionality?

(Benjamin Muschko) #2

The type is derived from your custom task class. The description is whatever value you assign to the ‘description’ property.

(Nathan Gutzmann) #3

Is there a way to provide possible command line options? Or is that also part of the description? The text below the example says that this is supported, however I’m not sure how. Additionally it looks like this example somehow supports that as well.

(Benjamin Muschko) #4

Some core tasks have built-in command line options (for example ‘dependencies’). These are displayed here. At the moment you can’t provide your own command line options for custom tasks. The description does not indicate any command line options.