Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a method in Gradle to execute some task after the build?

Tags:

gradle

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...

like image 983
Mr. P Avatar asked May 26 '14 09:05

Mr. P


People also ask

How do I run a task after another task in Gradle?

A task's actions are run when the task is executed and must be added to the task's action list. This is done by using the task's doFirst, doLast or the << operator. Here is an example from the gradle documentation. I do agree that this is preferable when possible, but often some plugins etc.

Does Gradle build run all tasks?

You can execute multiple tasks from a single build file. Gradle can handle the build file using gradle command. This command will compile each task in such an order that they are listed and execute each task along with the dependencies using different options.


1 Answers

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

like image 94
Mr. P Avatar answered Sep 28 '22 08:09

Mr. P