From 1173f87415cd9742d78d4772c1cd9143a5d1a94a Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Wed, 5 Mar 2014 16:24:40 -0800 Subject: [PATCH] Add new user story representing the new RootPlugin feature. Update ordering/AddSettingsusage. --- ...-Stories:-Project-Natures---AutoPlugins.md | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/User-Stories:-Project-Natures---AutoPlugins.md b/User-Stories:-Project-Natures---AutoPlugins.md index 9b36a87..340e4a2 100644 --- a/User-Stories:-Project-Natures---AutoPlugins.md +++ b/User-Stories:-Project-Natures---AutoPlugins.md @@ -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`) \ No newline at end of file +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) +``` \ No newline at end of file