2019-10-04 13:50:39 +07:00
|
|
|
# sbt
|
|
|
|
|
|
|
|
> Build tool for Scala and Java projects.
|
2021-10-04 15:41:27 -04:00
|
|
|
> More information: <https://www.scala-sbt.org/1.x/docs/>.
|
2019-10-04 13:50:39 +07:00
|
|
|
|
2021-09-12 16:03:27 +02:00
|
|
|
- Start a REPL (interactive shell):
|
2019-10-04 13:50:39 +07:00
|
|
|
|
|
|
|
`sbt`
|
|
|
|
|
2019-11-05 03:00:57 +07:00
|
|
|
- Create a new Scala project from an existing Giter8 template hosted on GitHub:
|
|
|
|
|
|
|
|
`sbt new {{scala/hello-world.g8}}`
|
|
|
|
|
2021-10-07 13:28:53 -04:00
|
|
|
- Compile and run all tests:
|
|
|
|
|
|
|
|
`sbt test`
|
|
|
|
|
2021-10-04 15:41:27 -04:00
|
|
|
- Delete all generated files in the `target` directory:
|
|
|
|
|
|
|
|
`sbt clean`
|
|
|
|
|
2021-10-04 23:10:22 -04:00
|
|
|
- Compile the main sources in `src/main/scala` and `src/main/java` directories:
|
|
|
|
|
|
|
|
`sbt compile`
|
|
|
|
|
2019-10-04 13:50:39 +07:00
|
|
|
- Use the specified version of sbt:
|
|
|
|
|
|
|
|
`sbt -sbt-version {{version}}`
|
|
|
|
|
|
|
|
- Use a specific jar file as the sbt launcher:
|
|
|
|
|
|
|
|
`sbt -sbt-jar {{path}}`
|
|
|
|
|
|
|
|
- List all sbt options:
|
|
|
|
|
|
|
|
`sbt -h`
|