In fact, that user was trying to use a TestReport task to reportOn a Test task. Doing that automatically adds a dependency on the Test task from the TestReport task. In turn that means that Test.finalizedBy(TestReport) will not work properly.
That seems unfortunate since a test report is one of the obvious use cases for finalizedBy. Perhaps TestReport.reportOn should add a finalizedBy relationship rather than a dependsOn one? In the general case is there a reason why we can/would not support task a { finalizedBy "b" } task b { dependsOn "a" } Perryn On Sun, Feb 16, 2014 at 1:20 PM, Perryn Fowler <perryn.fow...@gradleware.com > wrote: > someone else trying to do the same thing... > > > http://forums.gradle.org/gradle/topics/finalizer_task_does_not_run_if_finalized_task_fails > > > > On Mon, Jan 20, 2014 at 10:25 PM, Luke Daley <luke.da...@gradleware.com>wrote: > >> Hi, >> >> >> http://forums.gradle.org/gradle/topics/finalizer_tasks_that_depend_on_the_base_task_do_not_execute_if_the_base_task_fails >> >> task a { finalizedBy "b" } >> task b { dependsOn "a" } >> >> If a fails, b won't be executed. >> >> The use case listed in the report is something similar to the jacoco >> report task debate. The user wants "b" to be executed if "a" is in the task >> graph, and "a" to be executed if "b" is in the task graph. >> >> There's a case for this, but I'm having trouble finding a conceptual fit. >> >> -- >> Luke Daley >> Principal Engineer, Gradleware >> http://gradleware.com >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >