SBT plugin to ease the launch of Ammonite
sbt-ammonite is a SBT plugin that adds a ammonite:run command to SBT,
that launches an Ammonite session
against the current project.
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:runinstead of console.
To include the test build products, type
ammonite-test:runinstead of test:console.
These two commands can be scoped along specific projects too, like
core/ammonite:runor
generic/ammonite-test:runInitial 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.)
The Ammonite version is set via the ammoniteVersion key. It reads its value:
- from the
AMMONITE_VERSIONenvironment variable if set, else - from the
ammonite.versionJava property if set, else it - fallbacks to an hard-coded default version (currently,
0.6.0).
Set the AMMONITE_VERSION environment variable or the ammonite.version Java
property to bump the Ammonite version.
- Incompatible with the recent versions of
sbt-ensime(from0.3.2to0.5.0at least, #9) - Incompatible with
sbt-coursier
Copyright 2015-16, Alexandre Archambault
Released under a MIT license