Enter SBT interactive shell
$ sbt
Common useful operations:
projects
: List all projects and mark the current oneproject <NAME>
: Switch the current project toclean
: Deletes all generated files from compilationcompile
: Compiles the main sources (in src/main/scala) of the current projectconsole
: Open the REPL with the current project loadedtest
: Compiles (main and test sources) and runs all teststestOnly
: Compiles (main and test sources) and runs matching testsscalafmtAll
: Format code for all configurations and projects
Run multiple commands:
>;clean;compile;test
Prepend ~
to any command to run it in watch mode. It can be used with one command:
>~test
or with many commands:
>~;scalafmtAll;clean;test