Skip to content

Instantly share code, notes, and snippets.

@fran0x
Created August 11, 2016 09:38
Show Gist options
  • Save fran0x/422f3afd418d164657684d7d399915ad to your computer and use it in GitHub Desktop.
Save fran0x/422f3afd418d164657684d7d399915ad to your computer and use it in GitHub Desktop.
Cheat Sheet SBT

Cheat Sheet SBT

To install sbt in OS X run brew install sbt (requires the almighty Homebrew installed first).

Basic commands are the following:

Command Action
Deletes all generated files (in the target directory) clean
Compiles the main sources (in src/main/scala and src/main/java directories) compile
Compiles and runs all tests test
Starts the Scala interpreter with a classpath including the compiled sources and all dependencies; to return to sbt, type :quit console
Runs the main class for the project in the same virtual machine as sbt run <argument>*
Creates a jar file containing the files in src/main/resources and the classes compiled from src/main/scala package
Displays detailed help for the specified command; if no command is provided, displays brief descriptions of all commands help <command>
Reloads the build definition (build.sbt, project/*.scala, project/*.sbt files); needed if you change the build definition reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment