Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between `./build.sbt` and `./project/build.sbt`?

For example, I want to set a key in the build definition, which one should I put the setting in? The build.sbt in the root directory? Or the build.sbt in project directory?

I think both will work. Is there any reason that I could prefer one to the other?

like image 943
Hanfei Sun Avatar asked Dec 15 '14 16:12

Hanfei Sun


People also ask

What is a build sbt file?

sbt is an open-source build tool for Scala and Java projects, similar to Apache's Maven and Ant.

What is build sbt in Scala?

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.

How do I find my sbt build?

Create or open your sbt project. In the Project tool window, in the source root directory, locate the build. properties file and open it in the editor. In the editor explicitly specify the version of sbt that you want to use in the project.

Is sbt same as Scala?

sbt is an open source build tool for Scala and Java projects, similar to Java's Maven or Ant. Its main features are: native support for compiling Scala code, and integration with many Scala test frameworks.


1 Answers

The project folder should not contain build.sbt, only plugins.sbt and .scala files. The Scala files are typically used to create some common object with vals that are used in several builds throughout your project. I also usually create a dev.sbt that contains plugins that I'm using for development, and that file stays out of version control.

like image 57
Marius Soutier Avatar answered Sep 25 '22 19:09

Marius Soutier