mirror of https://github.com/sbt/sbt.git
Include base directory to watched sources
If `sourcesInBase` is true, we must also watch sources in the base directory.
This commit is contained in:
parent
ec54269467
commit
c395f1d464
|
|
@ -316,7 +316,9 @@ object Defaults extends BuildCommon {
|
||||||
includeFilter in unmanagedSources,
|
includeFilter in unmanagedSources,
|
||||||
excludeFilter in unmanagedSources).value,
|
excludeFilter in unmanagedSources).value,
|
||||||
watchSources in ConfigGlobal ++= {
|
watchSources in ConfigGlobal ++= {
|
||||||
val bases = unmanagedSourceDirectories.value
|
val baseDir = baseDirectory.value
|
||||||
|
val bases = unmanagedSourceDirectories.value ++ (if (sourcesInBase.value) Seq(baseDir)
|
||||||
|
else Seq.empty)
|
||||||
val include = (includeFilter in unmanagedSources).value
|
val include = (includeFilter in unmanagedSources).value
|
||||||
val exclude = (excludeFilter in unmanagedSources).value
|
val exclude = (excludeFilter in unmanagedSources).value
|
||||||
bases.map(b => new Source(b, include, exclude))
|
bases.map(b => new Source(b, include, exclude))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue