'Running only the root task but not the subproject's tasks unless specified in a multi-project setup
I have a multi-project gradle with this structure:
root
:proj1
:proj2
I also have a task called mytask in all 3 projects.
Currently if I do gradle mytask all 3 tasks runs:
:mytask
:proj1:mytask
:proj2:mytask
I know that if I run gradle :mytask only the the root mytask run.
However I would like to:
gradle mytaskruns only the root :mytaskgradle mytask proj1:mytaskruns both tasks (root & prod1) but not :proj2:mytask
Note that this is the standard behaviour of the gradle native task properties :
gradle propertiesruns only the root :propertiesgradle properties myproj:propertiesruns both (root & proj1) but not :proj2:properties
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
