Gradle is slow to build IDEA project files


(Luke Quinane) #1

When trying to rebuild the IDEA project files for a largish project, the build seems quite slow (almost as slow as a complete rebuild of the whole project). Running Gradle with info enabled it seems to be hitting the artifactory server over and over for the same jar file. I’m sort of wondering if there is something funny with that jar which makes it problematic?

gradle --info cleanIdea idea

[ Lots of output before this point... ]
:tools:ideaModule (Thread[main,5,main]) completed. Took 21.883 secs.
:tools:idea (Thread[main,5,main]) started.
:tools:idea
Skipping task ':tools:idea' as it has no actions.
:tools:idea (Thread[main,5,main]) completed. Took 0.003 secs.
:user-session:ideaModule (Thread[main,5,main]) started.
:user-session:ideaModule
Executing task ':user-session:ideaModule' (up-to-date check took 0.0 secs) due to:
  Task.upToDateWhen is false.
:user-session:ideaModule (Thread[main,5,main]) completed. Took 0.249 secs.
:user-session:idea (Thread[main,5,main]) started.
:user-session:idea
Skipping task ':user-session:idea' as it has no actions.
:user-session:idea (Thread[main,5,main]) completed. Took 0.004 secs.
:util:ideaModule (Thread[main,5,main]) started.
:util:ideaModule
Executing task ':util:ideaModule' (up-to-date check took 0.001 secs) due to:
  Task.upToDateWhen is false.
:util:ideaModule (Thread[main,5,main]) completed. Took 0.181 secs.
:util:idea (Thread[main,5,main]) started.
:util:idea
Skipping task ':util:idea' as it has no actions.
:util:idea (Thread[main,5,main]) completed. Took 0.003 secs.
:worker:ideaModule (Thread[main,5,main]) started.
:worker:ideaModule
Executing task ':worker:ideaModule' (up-to-date check took 0.001 secs) due to:
  Task.upToDateWhen is false.
Cached resource Fri Feb 12 15:34:51 AEDT 2016 is up-to-date (lastModified: http://repository.syd.company.com:8081/artifactory/libs-release/jlin
e/jline/2.12.company1.0/jline-2.12.company1.0.pom).
Cached resource Fri Feb 12 15:34:51 AEDT 2016 is up-to-date (lastModified: http://repository.syd.company.com:8081/artifactory/libs-release/jlin
e/jline/2.12.company1.0/jline-2.12.company1.0.pom).
Cached resource Fri Feb 12 15:34:51 AEDT 2016 is up-to-date (lastModified: http://repository.syd.company.com:8081/artifactory/libs-release/jlin
e/jline/2.12.company1.0/jline-2.12.company1.0.pom).
Cached resource Fri Feb 12 15:34:51 AEDT 2016 is up-to-date (lastModified: http://repository.syd.company.com:8081/artifactory/libs-release/jlin
e/jline/2.12.company1.0/jline-2.12.company1.0.pom).

[ Snip ... the same message repeats ~2000 times. ]

Cached resource Fri Feb 12 15:34:51 AEDT 2016 is up-to-date (lastModified: http://repository.syd.company.com:8081/artifactory/libs-release/jlin
e/jline/2.12.company1.0/jline-2.12.company1.0.pom).
Cached resource Fri Feb 12 15:34:51 AEDT 2016 is up-to-date (lastModified: http://repository.syd.company.com:8081/artifactory/libs-release/jlin
e/jline/2.12.company1.0/jline-2.12.company1.0.pom).
:worker:ideaModule (Thread[main,5,main]) completed. Took 21.695 secs.
:worker:idea (Thread[main,5,main]) started.
:worker:idea
Skipping task ':worker:idea' as it has no actions.
:worker:idea (Thread[main,5,main]) completed. Took 0.003 secs.

BUILD SUCCESSFUL

Total time: 5 mins 14.374 secs
Stopped 0 compiler daemon(s).

Any pointers would be appreciated! We’re using Gradle 2.8.

Thanks, Luke