Things I learned in the book Gradle beyond the basics

Help me improve this document!


Tasks can be created by rules. These tasks are called “task rules”. They are dynamically created when a task matching their pattern is invoked.


Single project build phase

Initialization phase

  1. Execute settings.gradle
  2. Determine whether it’s a single project or a multi-project
  3. Locate the build files
  4. Create a Project object

Configuration phase

  1. Load the Project object
  2. Execute gradle.projectsLoaded()
  3. Execute project.beforeEvaluate()
  4. Execute the build file as groovy scripts, against the Project object
    1. DAG gets created
    2. Hook methods are run
  5. Execute project.afterEvaluate()
  6. Execute gradle.projectsEvaluated()

Execution phase

  1. Identifies the tasks to run
  2. Execute the tasks marked for execution
  3. Execute gradle.buildFinished()

Multi-project build phase

I am guessing that this puts a couple of  loops in the configuration phase and in the execution phase…

4 Responses to Things I learned in the book Gradle beyond the basics

  1. Brandon L says:

    So, did you crack it? Did you get gradle to work for your build flows? I’ve only started looking into it as a “4th generation make flow”

    • Martin d'Anjou says:

      Yes, I did. I will now use Gradle. I took the training and it was worth it, I highly recommend it. Gradle manages dependencies, Make does not.

  2. Evan Cox says:

    Hey, I was curious how your use of Gradle for verilog/systemverilog turned out. I tried to follow up to your post on the Gradle forum here , but not bites. Care to share your experiences, tips/tricks, Gradle build files, if possible?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: