Is there a method in Gradle to execute some task a

2019-02-21 16:52发布

问题:

Is there any method for executing some task after the build is done?

I have checked doLast but it is only for tasks (task1.doLast(task2)) and not for build...

回答1:

After reading and checking this the answer is build.finalizedBy(copyToLib)



回答2:

You can call

tasks.build.doLast(){
      println 'This will be printed after the build task even if something else calls the build task'  
}


标签: gradle