[GRADLE-1668] TaskExecutionGraph and TaskGraphExecuter Created: 07/Jul/11 Updated: 01/Nov/13 Resolved: 01/Nov/13
|Reporter:||Tim Berglund||Assignee:||Benjamin Muschko|
Pedantry: The org.gradle.api.invocation.Gradle class has the getGraph() method, which returns a TaskExecutionGraph. The run-time type returned by this method seems to be DefaultTaskGraphExecutor, which implements TaskGraphExecutor, which extends TaskExecutionGraph.
At the bottom of the pile, TaskExecutionGraph doesn't expose the useFilter() method, but its child interface TaskGraphExecutor does. As of this posting, training materials show useFilter being called on gradle.graph, and in 1.0-M3, the method is called in DefaultBuildExecutor.java:48. (This invocation is a little confusing to me, since the compile-time type of gradle.getBuild() is apparently TaskExecutionGraph, which doesn't expose useFilter().)
Without understanding the intended distinction between TaskExecutionGraph and TaskGraphExecutor, it seems like Gradle.getGraph() should return a TaskGraphExecutor, or the useFilter() method should be pulled up into TaskExecutionGraph.
|Comment by Benjamin Muschko [ 01/Nov/13 ]|
The method useFilter takes a parameter of type org.gradle.api.specs.Spec. I fixed the code example to the following: