I am trying to set up a multi-project using the new sbt 0.13 (build.sbt
). The idea that the lazy val
's name determines the sub project name sounds rather odd to me. Moreover, I don't get hyphenation but end up with camel case:
lazy val myprojectCore = project
When I list > projects
, I see myprojectCore
. How can I make this myproject-core
?
Also, what the purpose and relationship of the name
key now?
sbt is a popular tool for compiling, running, and testing Scala projects of any size. Using a build tool such as sbt (or Maven/Gradle) becomes essential once you create projects with dependencies or more than one code file.
sbt shell has a command prompt (with tab completion and history!). For example, you could type compile at the sbt shell: > compile. To compile again, press up arrow and then enter. To run your program, type run . To leave sbt shell, type exit or use Ctrl+D (Unix) or Ctrl+Z (Windows).
If anyone is looking for this now, with sbt 1.x
series we can do the following.
lazy val myprojectCore = project.withId("myproject-core")
One possibility:
lazy val `myproject-core` = project
But is this the way to do it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With