This is a cross-post from a StackOverflow question that didn’t garner much interest. Hoping I can find some expertise in this forum that can help me out.
I am finding gradle incredibly slow. In particular, I have a large multi-module project, which takes a considerable amount of time to start-up and parse all the project definitions.
To illustrate this problem, I have created a simple scenario which illustrates how slow gradle is without the complexities of a multi-module project:
- A completely empty
gradlewithout any parameters, and time how long it takes to parse the (empty) project file, and then exit showing me the usage statement:
To run a build, run gradle <task> ...
This is taking roughly 2.5 seconds to execute, as noted by the
Total Time .... output when gradle exits.
When modifying my gradle build scripts there is a lot of trial & error, making a change to
build.gradle and then executing
gradle build again. This means that I am constantly running into these delays when attempting to try-out my changes.
As noted on the StackOverflow question, adding
apply plugin: java to the project adds yet more time to the otherwise empty build, adding another second to take the typical execution time to ~3.5 seconds.
On StackOverflow I also drew comparisons with Maven, which is orders of mangitude faster at parsing project configuration, and initializing projects.
Is there something I’m missing? I’ve not found any similar complaints, which suggests there’s somethign wrong with my set-up, or the wider community are happy with these delays?
One final note; my environment is Gradle 2.7 on Windows 7.