Add missing `configs` method from Project to the build.sbt DSL.

* Create `configs` method for the sbt DSL
* Add ProjectManipulation for this method to implement.
This commit is contained in:
Josh Suereth 2014-09-09 08:54:43 -04:00
parent b43d358e0e
commit fa36d0e290
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@ package sbt
import internals.{
DslEntry,
DslSetting,
DslConfigs,
DslEnablePlugins,
DslDisablePlugins
}
@ -10,4 +10,6 @@ import internals.{
package object dsl {
def enablePlugins(ps: AutoPlugin*): DslEntry = DslEnablePlugins(ps)
def disablePlugins(ps: AutoPlugin*): DslEntry = DslDisablePlugins(ps)
def configs(cs: Configuration*): DslEntry = DslConfigs(cs)
}

View File

@ -54,4 +54,8 @@ case class DslEnablePlugins(plugins: Seq[AutoPlugin]) extends ProjectManipulatio
case class DslDisablePlugins(plugins: Seq[AutoPlugin]) extends ProjectManipulation {
override val toFunction: Project => Project = _.disablePlugins(plugins: _*)
}
/** Represents registering a set of configurations with the current project. */
case class DslConfigs(cs: Seq[Configuration]) extends ProjectManipulation {
override val toFunction: Project => Project = _.configs(cs: _*)
}