What does project location mean in SBT?

89 Views Asked by At

To define a project, I do

project in file(".")

What is the function of file("."), as opposed to settings baseDirectory?

For example, what is the difference between

lazy val myProject = project in file("foo")

and

lazy val myProject = (project in file(".")).settings(
  baseDirectory := file("foo"))
1

There are 1 best solutions below

0
On

For projects, there is no difference between using project in file(...) and setting baseDirectory yourself. use show baseDirectory to convince yourself :)

However, since baseDirectory is a setting, it can be used with any scope, e.g. you can set the base directory for a specific configuration or task.