SBT and other build systems
It's necessary to use a build tool for any enterprise project. There are lots of build tools that you can choose from, such as Maven, Gradle, Ant, and SBT. A good choice of build tool is the one which will let you focus on coding rather than compilation complexities.
Build with SBT
Here, we are going to give a introduction to SBT. Before going any further, you need to install SBT using the installation method that fits your system from their installations methods (URL: http://www.scala-sbt.org/release/docs/Setup.html).
So, let's begin with SBT to demonstrate the use of SBT in a terminal. For this build tool tutorial, we assume that your source code files are in a directory. You need to do the following:
- Open the terminal and change path to that directory by using
cd
, - Create a build file called
build.sbt
. - Then, populate that build file with the following lines:
name := "projectname-sbt" organization :="org.example" scalaVersion :="2...