sbt/sbt — pull request #1195 by eed3si9n (2014-03-20 11:18:48+00:00)
Title: Unifies AutoPlugin and RootPlugin

* Separates `def select` into `def trigger` and `def requires`.
* Setting `trigger = noTrigger` and `requires = empty` makes a plugin an opt-in "root".
* This now allows an opt-in plugin that lists required plugins that it can depend on.

For proof of concept (for non-breakage and the new feature) see the scripted test:

* [Q.scala](https://github.com/eed3si9n/sbt/blob/f8bedf4012a5c44cb159abe2c816702767219d0b/sbt/src/sbt-test/project/auto-plugins/project/Q.scala)
* [build.sbt](https://github.com/eed3si9n/sbt/blob/f8bedf4012a5c44cb159abe2c816702767219d0b/sbt/src/sbt-test/project/auto-plugins/build.sbt)

This adds an opt-in plugin with requirements named `S`:

```scala
// This is an opt-in plugin with a requirement
// Unless explicitly loaded by the build user, this will not be activated.
object S extends AutoPlugin
{
def requires = Q
def trigger = noTrigger

override def projectSettings = Seq(
del in q += " S"
)
}
```

The build user just needs to bring in `S` to grab its dependency `Q`:

```scala
// with S selected, Q is loaded automatically, which in turn selects R
lazy val projE = project.addPlugins(S)

...

val optInValue = (del in projE in q).value
same(optInValue, " Q S R", "del in projE in q")
```

Bring in `Q` transitively "enables" `R` and all three are topologically sorted (required first).

Review @jsuereth, @jroper, @huntc