Reputation: 27375
In the section 11.6.3 of the gradle manual page were mentioned that we can use command line option in gradle task.
This information includes the full task path, the task type, possible commandline options and the description of the given task.
But my question is how can we specify the options in task? Could anyone give an example?
Upvotes: 0
Views: 394
Reputation: 84756
Have a look a the following *build.gradle:
apply plugin: 'java'
task lol(type: JavaExec) {}
When gradle -q help --task lol
is run the following output occurs:
Detailed task information for lol
Path
:lol
Type
JavaExec (org.gradle.api.tasks.JavaExec)
Options
--debug-jvm Enable debugging for the process. The process is started suspended and listening on port 5005. [INCUBATING]
Description
-
So this is how option looks like: --debug-jvm
Here You can find how it's implemented - configuring an Option
not an Option
itself. org.gradle.api.internal.tasks.options.Option
is a part of internal gradle API. And it seems that it's still an incubating feature.
Upvotes: 3