3 Scala Build Tool (sbt)

After reading this lesson, you’ll be able to

  • Run commands in sbt
  • Create an sbt project
  • Describe the structure of the files of a Scala project built with sbt

In the previous lesson, you learned how to evaluate snippets of code using the Scala REPL. Programs have several components: they depend on other modules and libraries, and they are structured in multiple files and folders. In this lesson, you’ll discover the basics of the Scala Build Tool, sbt. You’ll compile and run your first Scala program on the JVM using sbt. In this book, you’ll use sbt to manage dependencies, compile your code, and run your Scala programs.

3.1 Why sbt?

You can build Scala projects using several build tools such as Maven, Ant, and Gradle, ...

Get Get Programming with Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.