Very slow Gradle builds

I know that language: java is not supported yet, but the Windows environment does have gradle and jdk8, so I’ve been trying it out. It works pretty well, but the biggest thing I’ve noticed is that it’s very slow. Here are the timings for the same build on Windows, Linux and OSX:

gradlew assemble: 421 seconds
gradlew check: 150 seconds
store build cache: 496 seconds
total time: 23 min 53 seconds

gradlew assemble: 49 seconds
gradlew check: 66 seconds
store build cache: 79 seconds
total time: 4 min 25 sec

gradlew assemble: 88 seconds
gradlew check: 106 seconds
store build cache: 129 seconds
total time: 7 min 7 sec

Here’s the link to the build:

Is there anything I can try changing in my config to get faster builds on Windows? Maybe I should disable the caching?

1 Like

Same observation when building JUnit 5: on Travis Windows, the build takes 3-5 times longer.

I don’t think that caching is the issue. Seems to me the (virtual) processor power is limited.

Windows builds are just slow in general, it doesn’t seem to be related to some specific software.

For example here’s nodejs/yarn where Windows is 4 times slower:

Disabling the windows defender is helping a bit. Always use this with

os: windows

    - powershell -command 'Set-MpPreference -DisableRealtimeMonitoring $true'