diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 03212aa94..072a7595d 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -371,13 +371,16 @@ object Defaults extends BuildCommon { }).value ) - def paths = Seq( + // Appended to JvmPlugin.projectSettings + def paths: Seq[Setting[_]] = Seq( baseDirectory := thisProject.value.base, target := baseDirectory.value / "target", historyPath := (historyPath or target(t => Option(t / ".history"))).value, sourceDirectory := baseDirectory.value / "src", sourceManaged := crossTarget.value / "src_managed", - resourceManaged := crossTarget.value / "resource_managed" + resourceManaged := crossTarget.value / "resource_managed", + // Adds subproject build.sbt files to the global list of build files to monitor + Scope.Global / checkBuildSources / fileInputs += baseDirectory.value.toGlob / "*.sbt" ) lazy val configPaths = sourceConfigPaths ++ resourceConfigPaths ++ outputConfigPaths diff --git a/sbt/src/sbt-test/nio/reload/build.sbt b/sbt/src/sbt-test/nio/reload/build.sbt index c143ba056..c5e320e75 100644 --- a/sbt/src/sbt-test/nio/reload/build.sbt +++ b/sbt/src/sbt-test/nio/reload/build.sbt @@ -11,3 +11,5 @@ exists := { } Global / onChangedBuildSource := ReloadOnSourceChanges + +val sub = project diff --git a/sbt/src/sbt-test/nio/reload/changes/broken.sbt b/sbt/src/sbt-test/nio/reload/changes/broken.sbt index 57e15cd57..5210c3db2 100644 --- a/sbt/src/sbt-test/nio/reload/changes/broken.sbt +++ b/sbt/src/sbt-test/nio/reload/changes/broken.sbt @@ -8,3 +8,5 @@ exists := { } Global / onChangedBuildSource := ReloadOnSourceChanges + +val sub = project diff --git a/sbt/src/sbt-test/nio/reload/changes/sub.sbt b/sbt/src/sbt-test/nio/reload/changes/sub.sbt new file mode 100644 index 000000000..f0ce2b852 --- /dev/null +++ b/sbt/src/sbt-test/nio/reload/changes/sub.sbt @@ -0,0 +1 @@ +libraryDependencies += "org.scala-sbt" % "sbt" % "1.3.0" \ No newline at end of file diff --git a/sbt/src/sbt-test/nio/reload/changes/working.sbt b/sbt/src/sbt-test/nio/reload/changes/working.sbt index c143ba056..c5e320e75 100644 --- a/sbt/src/sbt-test/nio/reload/changes/working.sbt +++ b/sbt/src/sbt-test/nio/reload/changes/working.sbt @@ -11,3 +11,5 @@ exists := { } Global / onChangedBuildSource := ReloadOnSourceChanges + +val sub = project diff --git a/sbt/src/sbt-test/nio/reload/sub/build.sbt b/sbt/src/sbt-test/nio/reload/sub/build.sbt new file mode 100644 index 000000000..e69de29bb diff --git a/sbt/src/sbt-test/nio/reload/sub/src/main/scala/Test.scala b/sbt/src/sbt-test/nio/reload/sub/src/main/scala/Test.scala new file mode 100644 index 000000000..405e020be --- /dev/null +++ b/sbt/src/sbt-test/nio/reload/sub/src/main/scala/Test.scala @@ -0,0 +1,3 @@ +object Test { + val x = sbt.Keys +} \ No newline at end of file diff --git a/sbt/src/sbt-test/nio/reload/test b/sbt/src/sbt-test/nio/reload/test index abfe64f5e..81c024396 100644 --- a/sbt/src/sbt-test/nio/reload/test +++ b/sbt/src/sbt-test/nio/reload/test @@ -17,3 +17,9 @@ $ copy-file changes/working.sbt build.sbt > foo foo; reload > exists foo + +-> compile + +$ copy-file changes/sub.sbt sub/build.sbt + +> compile