Make it so we can disable all default plugins (except the core plugin).

This commit is contained in:
Josh Suereth 2014-07-15 00:51:55 -04:00
parent 4f3da04515
commit e2949222b3
3 changed files with 20 additions and 1 deletions

View File

@ -904,7 +904,12 @@ object Defaults extends BuildCommon {
lazy val projectBaseSettings: Seq[Setting[_]] = projectCore ++ runnerSettings ++ paths ++ baseClasspaths ++ baseTasks ++ compileBase ++ disableAggregation lazy val projectBaseSettings: Seq[Setting[_]] = projectCore ++ runnerSettings ++ paths ++ baseClasspaths ++ baseTasks ++ compileBase ++ disableAggregation
// These are project level settings that MUST be on every project. // These are project level settings that MUST be on every project.
lazy val coreDefaultSettings: Seq[Setting[_]] = projectCore ++ disableAggregation lazy val coreDefaultSettings: Seq[Setting[_]] =
projectCore ++ disableAggregation ++ Seq(
// Missing but core settings
baseDirectory := thisProject.value.base,
target := baseDirectory.value / "target"
)
@deprecated("Default settings split into coreDefaultSettings and IvyModule/JvmModule plugins.", "0.13.2") @deprecated("Default settings split into coreDefaultSettings and IvyModule/JvmModule plugins.", "0.13.2")
lazy val defaultSettings: Seq[Setting[_]] = projectBaseSettings ++ defaultConfigs lazy val defaultSettings: Seq[Setting[_]] = projectBaseSettings ++ defaultConfigs
} }
@ -982,6 +987,7 @@ object Classpaths {
val ivyPublishSettings: Seq[Setting[_]] = publishGlobalDefaults ++ Seq( val ivyPublishSettings: Seq[Setting[_]] = publishGlobalDefaults ++ Seq(
artifacts :== Nil, artifacts :== Nil,
packagedArtifacts :== Map.empty, packagedArtifacts :== Map.empty,
crossTarget := target.value,
makePom := { val config = makePomConfiguration.value; IvyActions.makePom(ivyModule.value, config, streams.value.log); config.file }, makePom := { val config = makePomConfiguration.value; IvyActions.makePom(ivyModule.value, config, streams.value.log); config.file },
packagedArtifact in makePom := (artifact in makePom value, makePom value), packagedArtifact in makePom := (artifact in makePom value, makePom value),
deliver <<= deliverTask(deliverConfiguration), deliver <<= deliverTask(deliverConfiguration),

View File

@ -0,0 +1,8 @@
// TODO - currently root plugins (trigger == allRequirements && requires = Nil) can't be disabled, ever.
//lazy val noCore = project.disablePlugins(plugins.CorePlugin)
lazy val noIvy = project.disablePlugins(plugins.IvyPlugin)
lazy val noJvm = project.disablePlugins(plugins.JvmPlugin)
lazy val noJunit = project.disablePlugins(plugins.JUnitXmlReportPlugin)

View File

@ -0,0 +1,5 @@
> noJunit/test
> noJvm/update
# TODO - Tests for noIvy + noCore