mirror of https://github.com/sbt/sbt.git
Merge pull request #5054 from eatkins/watch-deprecations
Update deprecation warnings for api changes
This commit is contained in:
commit
946cbfe2b4
|
|
@ -161,17 +161,20 @@ object Watched {
|
|||
val Configuration =
|
||||
AttributeKey[Watched]("watched-configuration", "Configures continuous execution.")
|
||||
|
||||
@deprecated("Use defaultStartWatch in conjunction with the watchStartMessage key", "1.3.0")
|
||||
@deprecated("Use Watch.defaultStartWatch in conjunction with the watchStartMessage key", "1.3.0")
|
||||
val defaultWatchingMessage: WatchState => String =
|
||||
((ws: WatchState) => s"${ws.count}. ${waitMessage("")} ")
|
||||
.label("Watched.projectWatchingMessage")
|
||||
@deprecated(
|
||||
"Use defaultOnTriggerMessage in conjunction with the watchTriggeredMessage key",
|
||||
"Use Watch.defaultOnTriggerMessage in conjunction with the watchTriggeredMessage key",
|
||||
"1.3.0"
|
||||
)
|
||||
val defaultTriggeredMessage: WatchState => String =
|
||||
const("").label("Watched.defaultTriggeredMessage")
|
||||
@deprecated("Use clearOnTrigger in conjunction with the watchTriggeredMessage key", "1.3.0")
|
||||
@deprecated(
|
||||
"Use Watch.clearScreenOnTrigger in conjunction with the watchTriggeredMessage key",
|
||||
"1.3.0"
|
||||
)
|
||||
val clearWhenTriggered: WatchState => String =
|
||||
const(clearScreen).label("Watched.clearWhenTriggered")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,6 +120,17 @@ object Keys {
|
|||
).withRank(DSetting)
|
||||
val watchTriggers =
|
||||
settingKey[Seq[Glob]]("Describes files that should trigger a new continuous build.")
|
||||
|
||||
/**
|
||||
* Sets the message to display after a new build is triggered. By default,
|
||||
* it prints the file that triggered the build and what command(s) will be run.
|
||||
* To clear the screen, add
|
||||
* {{{
|
||||
* watchTriggeredMessage := Watch.clearScreenOnTrigger
|
||||
* }}}
|
||||
* to the build.
|
||||
*
|
||||
*/
|
||||
val watchTriggeredMessage = settingKey[(Int, Path, Seq[String]) => Option[String]](
|
||||
"The message to show before triggered execution executes an action after sources change. The parameters are the current watch iteration count, the path that triggered the build and the names of the commands to run."
|
||||
).withRank(DSetting)
|
||||
|
|
|
|||
Loading…
Reference in New Issue