mirror of https://github.com/sbt/sbt.git
Remove defaultSettings usage from the docs.
Given the addition/promotion of AutoPlugins, remove the references to the previously necessary Defaults.defaultSettings method.
This commit is contained in:
parent
3576baa76c
commit
01bb7ce2fd
|
|
@ -16,7 +16,7 @@ into multiple files.
|
|||
val buildVersion = "2.0.29"
|
||||
val buildScalaVersion = "2.9.0-1"
|
||||
|
||||
val buildSettings = Defaults.defaultSettings ++ Seq (
|
||||
val buildSettings = Seq (
|
||||
organization := buildOrganization,
|
||||
version := buildVersion,
|
||||
scalaVersion := buildScalaVersion,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ The following two files illustrate. First, if your project is in
|
|||
|
||||
lazy val root = Project(id = "hello",
|
||||
base = file("."),
|
||||
settings = Project.defaultSettings ++ Seq(sampleKeyB := "B: in the root project settings in Build.scala"))
|
||||
settings = Seq(sampleKeyB := "B: in the root project settings in Build.scala"))
|
||||
}
|
||||
|
||||
Now, create `hello/build.sbt` as follows:
|
||||
|
|
|
|||
|
|
@ -444,24 +444,28 @@ before it is initialized with an empty sequence.
|
|||
settings = Seq(
|
||||
libraryDependencies += "commons-io" % "commons-io" % "1.4" % "test"
|
||||
)
|
||||
)
|
||||
).disablePlugins(plugins.IvyModule)
|
||||
}
|
||||
|
||||
To correct this, include the default settings, which includes
|
||||
`libraryDependencies := Seq()`.
|
||||
To correct this, include the IvyModule plugin settings, which includes
|
||||
`libraryDependencies := Seq()`. So, we just drop the explicit disabling.
|
||||
|
||||
::
|
||||
|
||||
settings = Defaults.defaultSettings ++ Seq(
|
||||
libraryDependencies += "commons-io" % "commons-io" % "1.4" % "test"
|
||||
)
|
||||
object MyBuild extends Build {
|
||||
val root = Project(id = "root", base = file("."),
|
||||
settings = Seq(
|
||||
libraryDependencies += "commons-io" % "commons-io" % "1.4" % "test"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
A more subtle variation of this error occurs when using :doc:`scoped settings </Getting-Started/Scopes>`.
|
||||
|
||||
::
|
||||
|
||||
// error: Reference to uninitialized setting
|
||||
settings = Defaults.defaultSettings ++ Seq(
|
||||
settings = Seq(
|
||||
libraryDependencies += "commons-io" % "commons-io" % "1.2" % "test",
|
||||
fullClasspath := fullClasspath.value.filterNot(_.data.name.contains("commons-io"))
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue