Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Enable cross-building of sbt plugins
tag: v0.6.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
notes
project
src
.gitignore
LICENSE
README.md
build.sbt
project.sbt
publish.sbt

README.md

Sbt Cross Building Plugin

Building plugins for multiple versions of sbt is often cumbersome because just to build a version of your plugin for another version of sbt you have to change the sbt version of your plugin build. This hinders fast adoption of new sbt versions because just to release a backwards compatible version of your plugin all the build plugin dependencies have to be available for every version sbt you want to build for.

This plugin tries to ease the building of plugins for older versions of sbt.

Usage

Add

addSbtPlugin("net.virtual-void" % "sbt-cross-building" % "0.6.0")

to your project/plugins.sbt and you are ready to go.

Features

  • sbtVersion in sbtPlugin sets the target sbt version for your plugin
  • Use the ^^ command in the sbt shell to set the sbt version you want to build against. For example, sbt version 0.11.0 is selected by running

    ^^0.11.0

    in the sbt console. That's basically equivalent to running

    set sbtVersion in sbtPlugin := "0.11.0"

  • Set the CrossBuilding.crossSbtVersions setting to a list of sbt versions to build against and then use ^ <command> to execute an sbt command for each of the sbt versions listed.

  • You can have custom (scala) source directories for particular versions of sbt. Currently, both src/main/scala-sbt-0.x or sbt/main/scala-sbt-0.x.y are supported. E.g. a source directory src/main/scala-sbt-0.11.2 will only be used when building against sbt 0.11.2, a source directory src/main/scala-sbt-0.11 will be used for any version of sbt 0.11.x.
  • You can build 0.12.0-Beta2 plugins from sbt 0.11.x. The right scala version will be chosen automatically from the version selected.

Known Issues

  • To allow building against other versions of sbt we have to rewrite a bunch of settings which are already defined in sbt itself. This may lead to issues, however, we've not experienced any such yet.

License

Copyright (c) 2012 Johannes Rudolph

Published under the BSD 2-Clause License.

Something went wrong with that request. Please try again.