Chapter 2. Getting started

 

This chapter covers

  • Testing code in a live interpreted session
  • Automatically running tasks when sources change
  • Filtering what tests to execute using testOnly
  • Providing discoverable usage using tab completion and an inspect command

The simple build tool (sbt) is used for building Java and Scala projects; its purpose is to allow users to skillfully perform the basics of building and to customize endlessly. sbt, at its core, provides a parallel execution engine and configuration system that allow you to design an efficient and robust script to build your software. sbt aims, above all, to be consistent in the basic concepts so that once you learn the concepts, you don’t have to unlearn them as you dive further into the build system.

sbt is a highly interactive tool, meant to be used during all stages of the development process. It provides interactive help and autocomplete for most services and promotes a type of autodiscovery for builds. Although you can use sbt as a command-line tool, it doesn’t really shine until you use its shell.

2.1. Setting up sbt

2.2. Setting up a build

2.3. Running code

2.4. Testing code

2.5. Summary

sitemap