1

i'm new to gradle. If i'm not using the either doFirst() or doLast(). In which order the lines in a plugin(say) are executed. i can observe that they are not executed sequentially? Can somebody explain the execution flow of a gradle file?

Thanks

Jeevi
  • 2,962
  • 6
  • 39
  • 60

1 Answers1

5

The Gradle build lifecycle is documented here.

It can be summarized by "ICE": Initialization, Configuration, Execution.

Your question is focused on Execution. For a single-project build, it is described in section "48.5. Configuration and execution of a single project build" at the above link.

For plugins, the task dependency graph will depend on the plugin specifics. For example, see the Java plugin for a list of its tasks and dependencies.

Michael Easter
  • 23,733
  • 7
  • 76
  • 107
  • 1
    Thanks. But i cant clearly get what all executed in configuration phase and what is done in execution phase... can u briefly tell me? – Jeevi Sep 06 '12 at 06:21
  • How is the execution flow of gradle tasks determined in a build.gradle file when no default task is defined and the project is executed by calling the `gradle` command? – Parag Kadam Aug 02 '20 at 16:02