Found the place that suggested the above usage for addRule: How to run a task for a subset of multiproject-build
addRule