Running a gradle task with caching will only run a task if the inputsand outputsare either not defined or outdate. To get some debugging information about why a task is not UP-TO-DATE run gradle with –info
gradle taskA --info ...
With gradle you can build a dependency tree using the dependsOn relation. To create the relation A → B, you could write:
task A(dependsOn B) {.. }
Gradle will then take care of that all dependencies are executed before the task runs. Strictly speaking an outdated dependency B should cause A to be rerun too. Unfortunately I did not find a way to define a project as part of inputs , I though found a workaround to forcibly rebuild a parent node....
task clean() { // runs always doLast { // runs only when executed delete "${buildDir}" } } ...