rohit21agrawal
rohit21agrawal

Reputation: 1068

compile/package multiple configurations from command line sbt scala

is there a way to build/compile all configurations at once? I have a project that has a Dev configuration in addition to the default Compile and Test configuration, and i am looking for a command or a setting in my build.sbt that would allow me to compile/package all 3 configurations at once.

Basically looking for a way to avoid having to do these 3 commands to build the entire source tree:

sbt compile sbt dev:compile sbt test:compile

When I use sbt from IntelliJ it is able to do this on building the project, but I am looking to do this from the command line.

Upvotes: 0

Views: 215

Answers (1)

cbley
cbley

Reputation: 4608

First, you can run multiple tasks with a single sbt invocation:

sbt compile dev:compile test:compile

Second, you could define an alias in your build which does what you want:

addCommandAlias("compileAll", "; compile; dev:compile; test:compile")

Then, just run sbt compileAll.

Upvotes: 1

Related Questions