Yigit Boyar | 9b2c179 | 2021-08-26 19:26:53 -0700 | [diff] [blame] | 1 | /** |
2 | * A gradle init script that will re-run tasks that were requested in the ./gradlew command | ||||
3 | * see profile.sh for usages. | ||||
4 | */ | ||||
5 | def requestedTasks = startParameter.taskRequests.collect { | ||||
6 | it.args | ||||
7 | }.flatten() | ||||
8 | taskGraph.addTaskExecutionGraphListener { graph -> | ||||
9 | graph.beforeTask { task -> | ||||
10 | if (requestedTasks.contains(task.path)) { | ||||
11 | task.outputs.upToDateWhen {false} | ||||
12 | } | ||||
13 | } | ||||
14 | } |