Mark answer Harrah is now deprecated.
Here is the version that works for sbt 0.13 and higher and is the only one of the two versions that work in sbt 1.0 onwards.
Prior to sbt 0.13, you had the <+=
syntax for assigning values, and you could apply
on the keys.
From 0.13 a new, more uniform syntax was introduced, partly called value
DSL. Starting with version 1.0, the old syntax has been removed.
// From the old, apply-based version... cleanFiles <+= baseDirectory { base => base / "temp" } // ...we change to .value and collection-like syntax cleanFiles += baseDirectory.value / "temp"
cleanFiles
and other collection-based keys now mimic the (mutable) collection, so you can add values ββto it using the +=
operator.
.value
does not force the baseDirectory
to be evaluated when it is written, but cleanFiles
evaluated each time, so it is different for each subproject.
Check and command syntax updated
There is also a slight difference in the syntax of inspect clean-files
.
hyphen-named-commands
are deprecated at 0.13 and removed at 1.0. They have been replaced with lowerCamelCaseCommands
, so they are the same on the console as in your build.sbt
.inspect
no longer shows the value of your key (I could not find version information for this). Instead, you should use show
.
sbt:root-_t> show cleanFiles [info] * C:\Users\Adowrath\_T\target\scala-2.12 [info] * C:\Users\Adowrath\_T\target\streams [info] * C:\Users\Adowrath\_T\temp [success] Total time: 0 s, completed 06.02.2018, 10:28:00
source share