1

What are ways to minimize Gradle runtime when running a single task that is known to have no task dependencies on a project containing many sub-projects (over 100) where just configuration phase takes over 80 seconds? Most time is wasted in configuration phase, configuring tasks that are known not to be executed.

I'm aware of --exclude-task that allows to exclude a task from running. However this seems a bit clumsy since I'd like to exclude all but one task.

There is also a Configuration cache however it is still an incubation effort (as of version 7.4.2) and it conflicts with some used features like Gradle.addBuildListener.

czerny
  • 15,090
  • 14
  • 68
  • 96
  • 80 seconds taken in the configuration phase? maybe it's time for a refactoring in your script in order to implement https://docs.gradle.org/current/userguide/task_configuration_avoidance.html , i don't think you will find any way to "skip" some of the configuration phase – M.Ricciuti Oct 28 '22 at 15:41
  • you could also give a try to incubating feature https://docs.gradle.org/current/userguide/configuration_cache.html – M.Ricciuti Oct 28 '22 at 17:42

0 Answers0