If the test fails , then test.doLast is never called. Assuming doLast is called, still I don't understand how to call another task from doLast or from anywhere else.
Also if a task has both config closure and action closure, how will you define and call it Thanks, Haneef -----Original Message----- From: Ken Sipe [mailto:[email protected]] Sent: Monday, April 25, 2011 12:00 PM To: [email protected] Subject: Re: [gradle-user] How to call a task from another task why wouldn't you do a test.doLast() ? Ken Sipe | [email protected] | blog: http://kensipe.blogspot.com On Apr 25, 2011, at 12:58 PM, Ali, Haneef wrote: > Hi , > > I have a tar task which creates a tar of junit report which will be > published in another location. All I want to do is, call this task in test > irrespective of test failure or success. I tried task.execute() and it > doesn't seem to work. Am I missing something > > > > task reportsTar(type: Tar ) { > // from, to configuration > } > > > test { > afterSuite{ > if (!it.parent){ > reportsTar.execute() > } > } > } > > > Thanks, > Haneef > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
