Add new user story representing the new RootPlugin feature. Update ordering/AddSettingsusage.

Josh Suereth 2014-03-05 16:24:40 -08:00
parent 8bde1c61ac
commit 1173f87415
1 changed files with 21 additions and 8 deletions

@ -92,13 +92,8 @@ User adds the following to their `build.sbt`:
```scala
import AddSettings._
val autoPluginsExceptXYZ =
plugins {
case x: AutoPlugin => x != XYZ
case _ => fasle
}
val enableXYZ = plugins(_ == XYZ)
val autoPluginsExceptXYZ = autoPlugins(_ != XYZ)
val enableXYZ = autoPlugins(_ == XYZ)
val important = project.autoSettings(autoPluginsExceptXYZ, enableXYZ, projectSettings, defaultSbtFiles, userSettings)
```
@ -109,4 +104,22 @@ This would ensure the following setting order:
2. The XYZ plugin specficially
3. The settings configured via Build.scala files directly on project instances
4. Any .sbt files found in the baseDirectory of the build.
5. Any settings found in .sbt files of the User's sbt home (`~/.sbt/0.13`)
5. Any settings found in .sbt files of the User's sbt home (`~/.sbt/0.13`)
## User Story: user wants to create a C++ workflow that does not include the Java workflow
1. User creates a 'root' plugin representing the core C++ features:
```scala
object CppPlugin extends RootPlugin {
override def projectSettings = ...
override def globalSettings = ...
}
```
2. Create a helper project instantiation.
```scala
def cppProject(name: String, dir: File): Project =
Project(name,file).disablePlugin(plugins.JvmModule).addPlugins(CppPlugin)
```