Scala is installed Linux workstations in the CS Computer lab in 301 MLH. You can access those workstations remotely from your own computer.
A build.sbt file is a set of key-value pairs describing various configurations of your project. Values are associated with a given key in the build.sbt file using the following syntax key := value .
Typically three key-value pairs are always defined in build.sbt:
name := "Hello" version := "0.1" scalaVersion := "2.11.4"
SBT also allows users to indicate library dependencies for their project. These dependencies can be defined by adding the following in build.sbt:
libraryDependencies += <groupId> % <artifactID> % <revision>Note that the operator += appends a library to the previous value of the libraryDependencies attribute (where := would replace the previous value).
When using SBT in interactive mode users are presented with a command prompt where they can enter a variety commands. The most useful commands for the purposes of this class are:
For convenience sbt also allows commands to be automatically rerun whenever a source file of the project is modified. This is done by prefixing a given command with ~. For example,
~ compilewill watch for changes in source files and automatically recompile them as needed every time you save your changes.