I have implemented the history functionality for task execution. Every
task has now a getHistory() method which returns a TaskHistory object.
TaskHistory has two methods, wasSuccessful and getExecutionTime. The
latter is null if the last execution was not successful. A non
existing history file is equivalent to a non-successful last
execution. If a task fails, any existing history file is deleted. The
history files are under <buildDir>/.gradle/task-execution-history.
This means the history is removed by a clean.
Now I'm left with one problem. After the clean task is executed, the
build directory is created again for storing the history information
of the clean task. I'm glad that our integration tests pointed this
out to me :)
I don't see a good solution for this problem yet. Right now the
history is written in the DefaultTaskExecuter. To solve the problem
above we could:
1.) We could start implementing our task input/output model. At the
moment that would be a simple flag indicating whether a task has
output or not. Only for tasks with output a history is written.
2.) Move the history writing to the AbstractTask class into a method
that can be overridden.
Thoughts?
- Hans
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email