scrupal / scrupal-sbt   0.4.1

GitHub

A template for starting new Scrupal projects

Scala versions: 2.10
sbt plugins: 0.13

Scrupal SBT AutoPlugin

Build Status Join the chat at https://gitter.im/scrupal/scrupal-sbt Release

This sbt plugin provides all the boilerplate SBT goodness needed for developing with Scrupal. The plugin includes all of the following SBT plugins and default configurations for them

The ScrupalPlugin also ensures that:

  • You are using the correct JVM (8) and Scala (2.11) version for the version of Scrupal you use (matches ScrupalPlugin version)
  • Your play-test and play-specs2 libraries are included in your project and match the Play Framework sbt-plugin version
  • Scala compiler options are set to standard values for Scrupal
  • SBT uses the standard Scrupal project layout for your project (rather than the Play structure)
  • Your project's organization, name, version, title, and URLs are consistent across all tasks
  • The prompt is set to :...<remote_branch>: so you always know where you are
  • You have aliases for often used things: tq=test-quick, to=test-only, copmile=compile

Usage

To use this plugin, you need to include this line in your plugins.sbt file in your project directory:

addSbtPlugin("org.scrupal" % "scrupal-sbt" % "0.1.0") // For Latest Released Version

or for the latest snapshot version, use this line:

addSbtPlugin("org.scrupal" % "scrupal-sbt" % "0.2.0-SNAPSHOT") // For Latest Development Version

Your project's definition also needs to do a few things to get all this goodness. You can override everything that scrupal-sbt does, but there are a few things you must do. At a minimum, your project should look like this:

  lazy val example_proj = Project("example", file("./example"))
    .enablePlugins(ScrupalPlugin)
    .disablePlugins(PlayLayoutPlugin)
    .settings(
      scrupalTitle := "Example Project",
      scrupalPackage := "example"
      scrupalTitle  := "Title For Your Plugin" //A title for the Scrupal module for use in documentation
      scrupalCopyrightHolder :=  "Reactific Software LLC"  // The name of the copyright holder for the scrupal module
      scrupalCopyrightYears := Seq(2014,2015) // The years in which the copyright was in place
      scrupalDeveloprUrl := Url("https://github.com/reid-spencer") // The URL for the developer's home page
    )

The above assumes a project/Build.scala style build specification. But, if you're using build.sbt the important thing to remember is to make all the "scrupal..." settings and to enable the ScrupalPlugin.

That's it. We hope using scrupal-sbt helps make writing your Scrupal based projects easier.

Resources