Chapter 1. Why sbt?

 

This chapter covers

  • Why use a build tool?
  • Apache Ant
  • Apache Maven
  • Gradle
  • Why sbt?
  • Interactivity/reactivity of sbt

In this chapter we’re going to explore why someone would use sbt (Simple Build Tool) to give a bit of a background to this book. If you’re convinced that you need to use sbt, you can probably skip this chapter. We’ll cover why you’d want an automated build and what other options you have for Scala and Java development. Finally, we’ll compare these other options to sbt and show why we think sbt is a good option for a large range of builds but especially for Scala builds.

For the impatient: sbt is a build tool that creates a stable build platform and increases developer productivity by taking the good ideas from other build tools such as

  • Minimal configuration—default project layouts
  • A number of built-in tasks (test, compile, publish)

and adding new features:

  • A reactive development environment. (You change your source code, and sbt reruns your tests.)
  • Allowing developers to use the Scala REPL on their projects.
  • Faster compilation through incremental compilation and caching.
  • Automatic recompilation with different versions of Scala.

Let’s start at the beginning.

1.1. Why a build tool?

1.2. Apache Ant

1.3. Apache Maven

1.4. Gradle

1.5. Why sbt?

1.6. Interactivity/reactivity of sbt

1.7. Summary

sitemap