I have defined a simple Gradle task of type Exec and I'm trying to pass a parameter to that task when calling it from another task.
How does one do that ?
It isn't possible to call a task from another task. Instead, declare two tasks and make one depend on the other. (Calling the internal task.execute() method is unsupported, and its behavior is undefined.) For cases where having a second task isn't feasible, there is a project.exec {} method, which has exactly the same API as the task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With