Merge pull request #1211 from eed3si9n/topic/renamemodule

Rename GlobalModule -> CorePlugin
This commit is contained in:
Josh Suereth 2014-03-26 11:20:40 -04:00
commit 121800ca7e
5 changed files with 17 additions and 17 deletions

View File

@ -29,9 +29,9 @@ object PluginDiscovery
import Paths._ import Paths._
// TODO - Fix this once we can autodetect AutoPlugins defined by sbt itself. // TODO - Fix this once we can autodetect AutoPlugins defined by sbt itself.
val defaultAutoPlugins = Seq( val defaultAutoPlugins = Seq(
"sbt.plugins.IvyModule" -> sbt.plugins.IvyModule, "sbt.plugins.IvyPlugin" -> sbt.plugins.IvyPlugin,
"sbt.plugins.JvmModule" -> sbt.plugins.JvmModule, "sbt.plugins.JvmPlugin" -> sbt.plugins.JvmPlugin,
"sbt.plugins.GlobalModule" -> sbt.plugins.GlobalModule "sbt.plugins.CorePlugin" -> sbt.plugins.CorePlugin
) )
val detectedAutoPugins = discover[AutoPlugin](AutoPlugins) val detectedAutoPugins = discover[AutoPlugin](AutoPlugins)
val allAutoPlugins = (defaultAutoPlugins ++ detectedAutoPugins.modules) map { case (name, value) => val allAutoPlugins = (defaultAutoPlugins ++ detectedAutoPugins.modules) map { case (name, value) =>

View File

@ -8,7 +8,7 @@ import Def.Setting
* *
* Can control task-level paralleism, logging, etc. * Can control task-level paralleism, logging, etc.
*/ */
object GlobalModule extends AutoPlugin { object CorePlugin extends AutoPlugin {
// This is included by default // This is included by default
override def trigger = allRequirements override def trigger = allRequirements

View File

@ -13,14 +13,14 @@ import Def.Setting
* - `artifacts` * - `artifacts`
* - `publishedArtifacts` * - `publishedArtifacts`
*/ */
object IvyModule extends AutoPlugin { object IvyPlugin extends AutoPlugin {
// We are automatically included on everything that has the global module, // We are automatically included on everything that has the global module,
// which is automatically included on everything. // which is automatically included on everything.
override def requires = GlobalModule override def requires = CorePlugin
override def trigger = allRequirements override def trigger = allRequirements
override lazy val projectSettings: Seq[Setting[_]] = override lazy val projectSettings: Seq[Setting[_]] =
Classpaths.ivyPublishSettings ++ Classpaths.ivyBaseSettings Classpaths.ivyPublishSettings ++ Classpaths.ivyBaseSettings
override lazy val globalSettings: Seq[Setting[_]] = override lazy val globalSettings: Seq[Setting[_]] =
Defaults.globalIvyCore Defaults.globalIvyCore
} }

View File

@ -14,10 +14,10 @@ import Def.Setting
* - `Test` * - `Test`
* - `Compile` * - `Compile`
*/ */
object JvmModule extends AutoPlugin { object JvmPlugin extends AutoPlugin {
// We are automatically enabled for any IvyModule project. We also require its settings // We are automatically enabled for any IvyModule project. We also require its settings
// for ours to work. // for ours to work.
override def requires = IvyModule override def requires = IvyPlugin
override def trigger = allRequirements override def trigger = allRequirements
override lazy val projectSettings: Seq[Setting[_]] = override lazy val projectSettings: Seq[Setting[_]] =

View File

@ -35,7 +35,7 @@ Adding settings for a plugin
A plugin can declare that its settings be automatically added, in which case you don't have to do anything to add them. A plugin can declare that its settings be automatically added, in which case you don't have to do anything to add them.
As of sbt 0.13.2, there is a new :doc:`auto-plugins <../DetailedTopics/AutoPlugins>` feature that enables plugins As of sbt 0.13.5, there is a new :doc:`auto-plugins <../DetailedTopics/AutoPlugins>` feature that enables plugins
to automatically, and safely, ensure their settings and dependencies are on a project. Most plugins should have to automatically, and safely, ensure their settings and dependencies are on a project. Most plugins should have
their default settings automatically, however some may require explicit enablement. their default settings automatically, however some may require explicit enablement.
@ -51,16 +51,16 @@ For example ::
> plugins > plugins
In file:/home/jsuereth/projects/sbt/test-ivy-issues/ In file:/home/jsuereth/projects/sbt/test-ivy-issues/
sbt.plugins.IvyModule: enabled in test-ivy-issues sbt.plugins.IvyPlugin: enabled in test-ivy-issues
sbt.plugins.JvmModule: enabled in test-ivy-issues sbt.plugins.JvmPlugin: enabled in test-ivy-issues
sbt.plugins.GlobalModule: enabled in test-ivy-issues sbt.plugins.CorePlugin: enabled in test-ivy-issues
Here, the plugins output is showing that the sbt default plugins are all enabled. Sbt's default settings are provided via three plugins: Here, the plugins output is showing that the sbt default plugins are all enabled. Sbt's default settings are provided via three plugins:
1. GlobalModule: Provides the core parallelism controls for tasks 1. CorePlugin: Provides the core parallelism controls for tasks
2. IvyModule: Provides the mechanisms to publish/resolve modules. 2. IvyPlugin: Provides the mechanisms to publish/resolve modules.
3. JvmModule: Provides the mechanisms to compile/test/run/package Java/Scala projects. 3. JvmPlugin: Provides the mechanisms to compile/test/run/package Java/Scala projects.
However, older plugins often required settings to be added explictly, so that :doc:`multi-project build <Multi-Project>` could have different types of projects. The plugin documentation will indicate how to configure it, but typically for older plugins this involves adding the base settings for the plugin and customizing as necessary. However, older plugins often required settings to be added explictly, so that :doc:`multi-project build <Multi-Project>` could have different types of projects. The plugin documentation will indicate how to configure it, but typically for older plugins this involves adding the base settings for the plugin and customizing as necessary.