gradle
gradle copied to clipboard
Runtime addition of task command line options
It would be very nice and handy to be able to add task command line options via some runtime API.
Just as being able to add inputs and outputs.
What I'm talking about are options that are currently added using @Option
.
If there would be a runtime API to add those options, we could have ad-hoc tasks with command line options.
But even more important and handy, you could add command line options to existing tasks or task types.
This way you can add options to task instances you create where you want to be able to select some value on each run when the concrete task does not support this.
Currently you would have to define some project property and then evaluate that.
But this has the usual drawback with name clashes and so on, that you do not have if the option is a proper task option.
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.
Adding command line options to existing tasks or task types is exactly what we also need. Currently, we have to declare new tasks which provide the options and call the original tasks from these.