harrah/xsbt — Issue #378: Plugin should be able to write to Build.settings as well as Project.settings
Author: jsuereth
Created: 2012-02-21 16:56:16+00:00
State: open

It's becoming very apparent to me that Plugins should be able to write certain configuration to a 'global sbt' location. This is configuration that is core to a given computer, not any particular project.

I'd like to propose changing the trait `Plugin` to look like the following:

trait Plugin {
@deprecated
def settings: Seq[Project.Setting[_]] = projectSettings
/** Settings to be appended to all projects in a build. */
def projectSettings: Seq[Project.Setting[_]] = Seq.empty
/** Settings to be appended to the build (global build-settings) */
def buildSettings: Seq[Project.Setting[_]] = Seq.empty
}

As well as loading the buildSettings of all plugins and appending them to a Build's settings value.

If I had this ability, a lot of my plugins could most likely be used with no configuration beyond inclusion.