How to find why gradle build is slow?


It becomes more and more annoying. Current problems I have with my build:

  1. It is not incremental - it takes ages and re-runs many tasks even I didn’t change anything in sources
  2. It is slow

Any flag to run, any plugin to troubleshot the build. And find out what plugin is breaking incremental build, why gradle thinks it should be re-run, why particular step is taking so long, etc

Are there any guide how to do it?


This looks like a great job for Build Scans. Have you tried them yet?

There’s also --profile

If on Windows look at this thread: