With the gradle java plugin you get the following tasks which are very neat:
buildDependents buildNeeded
I would like to have similar tasks for running tests only.
testDependents - runs the unit tests for this project and all projects that depend on it. testNeeded - runs the unit tests for this and all projects it depends on.