5

I'm developing a custom Gradle Plugin that depends on another plugin. For a specific task to run I have to run a task from an external plugin first.

project.tasks.create("MyTaskName", MyTaskName) {
    it.description = "MyDescription"
}.dependsOn("taskFromOtherPlugin")

So far I'm simply using the base functionality. However, I need to infer command line parameters to the other tasks plugin. When running the external task manually it would just be:

gradle taskFromOtherPlugin --parameter1 value1

How do I get the --parameter1 value1 into the .dependsOn structure? So what I would need is something like

project.tasks.create("MyTaskName", MyTaskName) {
    it.description = "MyDescription"
}.dependsOn("taskFromOtherPlugin --parameter1 value1")
JoschJava
  • 1,152
  • 12
  • 20
  • According to https://stackoverflow.com/questions/52171801/gradle-dependent-task-doesnt-pass-command-line-options-to-parent-task it's not possible this way. But maybe someone has an idea? – JoschJava Aug 15 '19 at 10:12

0 Answers0