alexarchambault / sbt-ammonite

SBT plugin to ease the launch of Ammonite
49 stars 8 forks source link

sbt-ammonite

SBT plugin to ease the launch of Ammonite

Build Status

sbt-ammonite is a SBT plugin that adds a ammonite:run command to SBT, that launches an Ammonite session against the current project.

Quick start

Add to your ~/.sbt/0.13/plugins/build.sbt,

resolvers += Resolver.sonatypeRepo("releases")

addSbtPlugin("com.github.alexarchambault" %% "sbt-ammonite" % "0.1.2")

Then at the prompt of a SBT project, type

ammonite:run

instead of console.

To include the test build products, type

ammonite-test:run

instead of test:console.

These two commands can be scoped along specific projects too, like

core/ammonite:run

or

generic/ammonite-test:run

Initial commands, specified with initialCommands in console, are also taken into account, and supplied to Ammonite as predef.

Tested with SBT 0.13.9, and Scala 2.10.5, 2.11.7, and 2.11.8. (Other Scala versions supported by Ammonite, and SBT down to 0.13.5 are expected to work too.)

Bumping the Ammonite version

The Ammonite version is set via the ammoniteVersion key. It reads its value:

Set the AMMONITE_VERSION environment variable or the ammonite.version Java property to bump the Ammonite version.

Known issues

Notice

Copyright 2015-16, Alexandre Archambault

Released under a MIT license