How to make Gradle run tasks in certain order?

Rade Milovic picture Rade Milovic · Oct 18, 2014 · Viewed 13k times · Source

Let's say that I have created separate tasks for running integration and acceptance tests in my gradle build script. When I run the build task I want to run testing tasks before in this order: unit tests(test task), integration tests (intergationTest task) and acceptance tests (acceptanceTest task). Is this possible and how?

Answer

Radim picture Radim · Oct 18, 2014

You are looking for "should run after" described in Gradle documentation - http://www.gradle.org/docs/current/userguide/more_about_tasks.html