[英]What does project location mean in SBT?
To define a project, I do 要定义一个项目,我要做
project in file(".")
What is the function of file(".")
, as opposed to settings baseDirectory
? 与设置baseDirectory
相反, file(".")
的功能是什么?
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"))
For projects, there is no difference between using project in file(...)
and setting baseDirectory
yourself. 对于项目, project in file(...)
使用project in file(...)
和baseDirectory
设置baseDirectory
之间没有区别。 use show baseDirectory
to convince yourself :) 使用show baseDirectory
来说服自己:)
However, since baseDirectory
is a setting, it can be used with any scope, eg you can set the base directory for a specific configuration or task. 但是,由于baseDirectory
是设置,因此它可以与任何范围一起使用,例如,可以为特定配置或任务设置基本目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.