travis-ci/travis-build — pull request #3 by gildegoma (2011-12-30 07:46:50+00:00)
Title: Add "first-class" Scala support, built by default with sbt 0.11.x

As discussed with Josh K., we keep this initial version very simple:

* **.travis.yml defaults will only support project configured for sbt >= 0.11** (because it is current standard and previous versions do not provide the ++ parameter).
* Any other build context (e.g *custom script* or *sbt 0.10*) needs to override builder defaults

Other features studied in proof of concept are kept on hold, waiting for (very improbable) user requests:

* Convention to auto-detect and use a local sbt version (like erlang builder does for rebar)
* Auto-detection of 'ant' or 'maven' build configuration files

Additional Notes:

* As for JRuby and Clojure, the JVM version is frozen (OpenJDK 1.6)
* .travis.yml Scala version is exported in SCALA_VERSION environment variable. This could help matrix build when default 'script' is overloaded. Such variable may help to adapt build script(s) without passing `#{config.scala}` as argument.
* Travis ruby-worker VM (now or soon) supports sbt 0.11.2, and provides Scala versions 2.9.1 and 2.8.2 by default (see travis-ci/travis-cookbooks#22 and travis-ci/travis-cookbooks@9cef5777058d65015439313466d1102444d80f99). Note that requesting any other valid Scala version will work fine as well, but 3-5 minutes longer (because sbt will download the needed dependencies at build time).
* So far, there is no constraint on the Scala version (only download optimization for 2.9.1 and 2.8.2 described above). We could easily add a filter that only starts an sbt build if requested scala is already installed on the VM:

```
if shell.file_exists?("$HOME/.sbt/boot/scala-#{config.scala}") ...
```