buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: Preferred way of choosing scala version?
Date Wed, 30 Dec 2009 01:54:11 GMT
On Tue, Dec 29, 2009 at 4:35 PM, Tommy C. Li <> wrote:

> What's the preferred way in buildr of choosing which version of Scala to
> compile with?
> I see a DEFAULT_VERSION variable in scala/compiler.rb, but am not sure how
> to override.

The easiest is to just set your SCALA_HOME to point to whichever Scala
version you want to use.

If you want to programmatically ensure a specific version, you would write:

Buildr::Scala::Scalac::REQUIRES.library = '2.8.Beta1-RC6'
Buildr::Scala::Scalac::REQUIRES.compiler = '2.8.Beta1-RC6'

after require 'buildr/scala'.

but due to a bug you currently also have to fiddle with the classpath :(

Java.classpath.reject! { |c| c.to_s.index('scala') }
Java.classpath << Buildr::Scala::Scalac::REQUIRES

I'll fix this for Buildr 1.4.0.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message