Chapter 4Simple Build Tool
The Simple Build Tool, or simply SBT, is a robust tool that uses the Scala language with an easy interface to create simple or complex behaviors within your project. While using SBT you can create a project with little to no configuration, and you can package/publish JARs and be presented with a very powerful shell that can be used to test your code from the outside.
With so many features, it's not hard to see why SBT is known as the de facto build tool for compiling, testing, and packaging Scala services and applications. Therefore, learning how to use and extend SBT for your own projects results in a very maintainable and extensible project.
To give a comparison, most developers have experiences in using build tools such as npm, gradle, and bundler. SBT allows you to pull in different dependencies, set up custom tasks, interact with external repositories, and even create your own testing frameworks through a slick DSL. All that's required is getting a basic understanding of the concepts to which SBT subscribes. Then build toward an understanding of how these techniques can support very small to very large scale Scala code bases. This is of course the purpose of this chapter.
While going over these techniques, keep in mind that the tool presented here is vast, and that configurations can become extremely customized toward ...
Get Professional 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.