I am writing a Build.scala file for sbt which needs to use the base directory of the project.
I can't figure out how to get the project path as a String from baseDirectory.
If using build.sbt it works doing
thePath := baseDirectory.value
but when I try to call value from a build.scala I get the error
value can only be used within a task or setting macro, such as :=, +=, ++=, Def.task, or Def.setting
Apparently, baseDirectory is a Def.Initialize[File] instance but I have looked at its code here and I do not fully understand it.