On Aug 18, 2009, at 7:31 AM, Hans Dockter wrote:
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.
Of course we can also save the history files into projectDir/.gradle/
task-execution-history. I guess this is what I will do for now.
- Hans
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email