mirror of https://github.com/sbt/sbt.git
Monitor project build sources
In sbt 1.3.0, we only monitor build sources in the root project directory and the root project meta build directory. This commit adds these inputs for each project. Fixes https://github.com/sbt/sbt/issues/5061.
This commit is contained in:
parent
ab2f3d6757
commit
26e60e9b6a
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -11,3 +11,5 @@ exists := {
|
|||
}
|
||||
|
||||
Global / onChangedBuildSource := ReloadOnSourceChanges
|
||||
|
||||
val sub = project
|
||||
|
|
|
|||
|
|
@ -8,3 +8,5 @@ exists := {
|
|||
}
|
||||
|
||||
Global / onChangedBuildSource := ReloadOnSourceChanges
|
||||
|
||||
val sub = project
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
libraryDependencies += "org.scala-sbt" % "sbt" % "1.3.0"
|
||||
|
|
@ -11,3 +11,5 @@ exists := {
|
|||
}
|
||||
|
||||
Global / onChangedBuildSource := ReloadOnSourceChanges
|
||||
|
||||
val sub = project
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
object Test {
|
||||
val x = sbt.Keys
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue