Hi,
I am having a problem regarding executing a task at last regardless of dependent tasks failures.
For example: task runTest.configure {
println “runTest” }
task runTestFull.configure {
dependsOn ‘startServer’, ‘runTest’, ‘stopServer’ }
I want to runTestFull task executes stopServer at last even the dependent task of runTestFull fails, but I don’t want stopServer to run if I only invoke runTest task. I was trying with finalizedBy, runTestFull.finalizedBy stopServer, but stopServer task is not executed when runTest task fails. Any ideas how to resolve this? Thanks!