Gradle tasks.build.doLast() not being invoked -
i want perform file copying after build has been performed , found answers saying tasks.build.dolast() can used. if add (or gradle) script, not being invoked.
does have invoked explicity, if how?
tasks.build.dolast(){ println '********************* last ******************' }
in absence of gradle version information assume using latest , pull current documentation. current code looks little off dolast() dot notation.
if writing task print line, code below work:
task1 { //task configuration goes here. dolast { println "********************* last ******************" } } if using dolast finalize task gradle has method doing that. can use finalizedby. below example:
task1 { println "task 1 successful" } task2 { println "********************* last ******************" } task1.finalizedby.task2 for more information on gradle tasks should check out chapter 14 , chapter 17 of gradle documentation. there examples of different ways define classes included in short chapters.
Comments
Post a Comment