How to avoid rebuilding resolvers in sbt 0.13.x?

We use maker to create a very large scala project. It takes about 3 minutes to compile an 18-layer project (about 30-40 modules).

I was interested in comparing performance with the later SBT, and I created a quick and dirty build file for sbt 0.12.4. Despite the fact that SBT uses parallel compilation, it took 10 minutes to compile the same project from a clean one (not counting the ivy load time).

The console output seems to have been busy resolving the dependencies that were in my ivy cache. I came across Why does sbt run dependency resolution every time after cleaning? , and it provides a hack that at least speeds up the second build up to 3.5 minutes. However, this hack does not work on 0.13.x.

  • What is the equivalent hack of 0.13?
  • Is there anything else to speed up compilation sbt?

Although this is not a project, suppose for all purposes and tasks that my build of the script looks something like build.scala (this file was the template that I used and added hack line 54).

+4
source share
1 answer

Here you go, add this. Works for me on 0.13.1.

cleanKeepFiles ++= Seq("resolution-cache", "streams").map(target.value / _)
+2

All Articles