Gradle versus Make

Recently I’ve started using Gradle for the first time in my life. As a frequent user of GNU make, I’m curious about its features, and here I’m sharing my experiences.

Comparison of key roundtrip times

The first thing that I’m looking at when comparing GNU make and Gradle is the key roundtrip times. Performance measurements are done on a AMD Turion(tm) X2 Ultra Dual-Core Mobile ZM-82 with 4 GB RAM running Ubuntu 12.04.5 LTS. I’m interested in how fast I can develop using this tool.

Rountrip Time #1 - Invokation with a non-existent task

You mistyped the task - how long does it take for the tool to tell you that you invoked it in the wrong way?

  • Roundtrip time of make foo: <1secs
  • Roundtrip time of gradle foo: 11 secs

Roundtrip Time #2 - List of tasks (first time)

You ask the tool what it can do for you - how long does it take for the tool to answer?

  • List of tasks using make help: <2 secs
  • List of tasks using ./gradlew tasks: 13 mins 11.286 secs

Gradle was downloading all the required libraries for the project. I understand that Gradle does so when I want to build something, and this is a nice feature. What I do not understand is why Gradle is doing so when all I want is just a list of tasks.

Note: For make help, I refer to makehelp.

Roundtrip Time #3

Okay, the first time in Gradle is special, so let’s run that again.

  • List of tasks using make help: <2 secs
  • List of tasks using ./gradlew tasks: 15.612 secs

If I would actually use gradle for the TDD Red-Green-Refactor cycle, I fear it would slow me down significantly. I’d need either a faster machine or simply have to use something else.


Comparison of roundtrip times between Gradle and GNU make
Task Time in seconds for
Gradle GNU make
Wrong invocation 11 1
list of tasks (first time) 791 2
list of tasks 15 2


Given the fact that the roundtrip times are essential for a good development speed, I am very surprised about the poor performance of Gradle as compared to make. I’ll keep you posted about further experiences.

Written on July 24, 2015