Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyphenated sub project names with new sbt 0.13 multi-project definition

Tags:

scala

sbt

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?

like image 478
0__ Avatar asked Aug 29 '13 13:08

0__


People also ask

What is sbt project?

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.

What is sbt command?

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).


2 Answers

If anyone is looking for this now, with sbt 1.x series we can do the following.

lazy val myprojectCore = project.withId("myproject-core")
like image 124
mmziyad Avatar answered Oct 23 '22 14:10

mmziyad


One possibility:

lazy val `myproject-core` = project

But is this the way to do it?

like image 20
0__ Avatar answered Oct 23 '22 13:10

0__