On Tue, Dec 29, 2009 at 4:35 PM, Tommy C. Li <[email protected]> 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.
alex