mirror of https://github.com/sbt/sbt.git
Fixes project/auto-plugins
This commit is contained in:
parent
96b5c3bb45
commit
cc090344d9
|
|
@ -13,7 +13,7 @@ This is the RC-1 release of sbt 1.0.
|
|||
- sbt 0.12 style `Project(...)` constructor is restricted down to two parameters. This is because `settings` parameter does not work well with Auto Plugins. Use `project` instead.
|
||||
- sbt 0.12 style key dependency operators `<<=`, `<+=`, `<++=` are removed. Please [migrate to :=, +=, and ++=](http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html#Migrating+simple+expressions). These operators have been sources of confusion for many users, and have long been removed from 0.13 docs, and have been formally deprecated since sbt 0.13.13.
|
||||
- Zinc 1 drops support for Scala 2.9 and earlier. Scala 2.10 must use 2.10.2 and above. Scala 2.11 must use 2.11.2 and above. (latest patch releases are recommended)
|
||||
- `config("tooling")` must be directly assigned to a `val`, like `val Tooling = config("tooling")`. This captures the lhs identifier into the configuration so we can use it from the shell later.
|
||||
- `config("tooling")` must be directly assigned to a *capitalized* `val`, like `val Tooling = config("tooling")`. This captures the lhs identifier into the configuration so we can use it from the shell later.
|
||||
- Changes `publishTo` and `otherResolvers` from SettingKeys to TaskKeys. [#2059][2059]/[#2662][2662] by [@dwijnand][@dwijnand]
|
||||
- `PathFinder`'s `.***` method is renamed to `.allPaths` method.
|
||||
- Drops sbt 0.12 style hyphen-separated key names (use `publishLocal` instead of `publish-local`).
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ check := {
|
|||
val rversion = projectID.?.value // Should be None
|
||||
same(rversion, None, "projectID")
|
||||
// Ensure with multiple .sbt files that disabling/enabling works across them
|
||||
val fDel = (del in q in projF).?.value
|
||||
same(fDel, Some(" Q"), "del in q in projF")
|
||||
val fDel = (del in Quux in projF).?.value
|
||||
same(fDel, Some(" Q"), "del in Quux in projF")
|
||||
//
|
||||
val adel = (del in projA).?.value // should be None
|
||||
same(adel, None, "del in projA")
|
||||
|
|
@ -57,10 +57,10 @@ check := {
|
|||
same(globalValue, "global 1", "demo in Global") // this is temporary, should be 0 until # is fixed
|
||||
val projValue = (demo in projC).?.value
|
||||
same(projValue, Some("project projC Q R"), "demo in projC")
|
||||
val qValue = (del in projC in q).?.value
|
||||
same(qValue, Some(" Q R"), "del in projC in q")
|
||||
val optInValue = (del in projE in q).value
|
||||
same(optInValue, " Q S R", "del in projE in q")
|
||||
val qValue = (del in projC in Quux).?.value
|
||||
same(qValue, Some(" Q R"), "del in projC in Quux")
|
||||
val optInValue = (del in projE in Quux).value
|
||||
same(optInValue, " Q S R", "del in projE in Quux")
|
||||
val overrideOrgValue = (organization in projE).value
|
||||
same(overrideOrgValue, "S", "organization in projE")
|
||||
// tests for top level plugins
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ package sbttest // you need package http://stackoverflow.com/questions/9822008/
|
|||
|
||||
object Imports
|
||||
{
|
||||
lazy val q = config("q")
|
||||
lazy val p = config("p").extend(q)
|
||||
lazy val Quux = config("q")
|
||||
lazy val Pippy = config("p").extend(Quux)
|
||||
|
||||
lazy val demo = settingKey[String]("A demo setting.")
|
||||
lazy val del = settingKey[String]("Another demo setting.")
|
||||
|
|
@ -47,13 +47,13 @@ object Q extends AutoPlugin
|
|||
override def trigger = allRequirements
|
||||
|
||||
override def projectConfigurations: Seq[Configuration] =
|
||||
p ::
|
||||
q ::
|
||||
Pippy ::
|
||||
Quux ::
|
||||
Nil
|
||||
|
||||
override def projectSettings: Seq[Setting[_]] =
|
||||
(demo := s"project ${name.value}") ::
|
||||
(del in q := " Q") ::
|
||||
(del in Quux := " Q") ::
|
||||
Nil
|
||||
|
||||
override def buildSettings: Seq[Setting[_]] =
|
||||
|
|
@ -77,9 +77,9 @@ object R extends AutoPlugin
|
|||
|
||||
override def projectSettings = Seq(
|
||||
// tests proper ordering: R requires Q, so Q settings should come first
|
||||
del in q += " R",
|
||||
del in Quux += " R",
|
||||
// tests that configurations are properly registered, enabling delegation from p to q
|
||||
demo += (del in p).value
|
||||
demo += (del in Pippy).value
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ object S extends AutoPlugin
|
|||
override def trigger = noTrigger
|
||||
|
||||
override def projectSettings = Seq(
|
||||
del in q += " S",
|
||||
del in Quux += " S",
|
||||
organization := "S"
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue