Enter SBT interactive shell
$ sbtCommon 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 loadedrun: Run the main (in src/main/scala) of the current projecttest: 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;testPrepend ~ to any command to run it in watch mode. It can be used with one command:
>~testor with many commands:
>~;scalafmtAll;clean;testFrom the SBT interactive shell:
c: Compiles the main sources (in src/main/scala) of the current projectcc: Clean and compiles the main sources (in src/main/scala) of the current projectcn: Open the REPL with the current project loadedr: Run the main (in src/main/scala) of the current projectt: Compiles (main and test sources) and runs all teststo: Compiles (main and test sources) and runs matching testsfm: Format code for all configurations and projects
Useful documentations: