Speeding up SBT builds

We have a project in which we build a large number of Scalatra microservices , repackaging them using the sbt-assembly plugin, then creating Docker images using sbt-docker . The process is slow due to the number of microservices, because the build plugin must handle all the transitive dependencies for each service. However, I note that most microservices have very similar dependencies. Is there any way to speed this up?

One of the limitations is that we do this on a Jenkins server (CI), so we call sbt clean from the beginning, so we can’t use any caching?

+7
scala jenkins sbt sbt-assembly scalatra
source share
1 answer

You can build a common dependency bank, which has all the dependencies that need all your microservices, which you only need to create once. Then you can collect cans for each of the microservices without any dependencies.

See " Design Separation and JAR Imprint ".

+1
source share

All Articles