28Aug/111
Grails: Speeding up dependency resolution
Something you might want to consider doing in your project is to lock down specific version of your dependencies instead of getting the latest release. The dependencies closure in our BuildConfig.groovy used to look like this:
dependencies { test "org.codehaus.geb:geb-core:latest.release" test "org.codehaus.geb:geb-spock:latest.release" test "org.seleniumhq.selenium:selenium-chrome-driver:latest.release" test "org.seleniumhq.selenium:selenium-firefox-driver:latest.release" test "org.seleniumhq.selenium:selenium-ie-driver:latest.release" test "org.spockframework:spock-core:0.5-groovy-1.7" }
Every script we ran took about 30-45 secs to resolve dependencies before it did anything, which was quite ridiculous. So after some digging around, Ben and I found out that if we specified the version of the plugins we wanted, that would drastically reduce the time spent resolving those dependencies.
This configuration shaved off about 20-35 seconds from our build:
dependencies { test "org.codehaus.geb:geb-core:0.6.0" test "org.codehaus.geb:geb-spock:0.6.0" test "org.seleniumhq.selenium:selenium-chrome-driver:2.4.0" test "org.seleniumhq.selenium:selenium-firefox-driver:2.4.0" test "org.seleniumhq.selenium:selenium-ie-driver:2.4.0" test "org.spockframework:spock-core:0.5-groovy-1.7" }
November 28th, 2011 - 00:16
That’s great.
Our mistake that we never tried digging it up. If we would have known that earlier, we would have saved a considerable amount of time on Frontline SMS Legal.