You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2013/01/24 02:21:48 UTC
svn commit: r1437824 - /buildr/trunk/lib/buildr/scala/compiler.rb
Author: boisvert
Date: Thu Jan 24 01:21:48 2013
New Revision: 1437824
URL: http://svn.apache.org/viewvc?rev=1437824&view=rev
Log:
Fix Scalac module initialization issue
Modified:
buildr/trunk/lib/buildr/scala/compiler.rb
Modified: buildr/trunk/lib/buildr/scala/compiler.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/compiler.rb?rev=1437824&r1=1437823&r2=1437824&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/compiler.rb (original)
+++ buildr/trunk/lib/buildr/scala/compiler.rb Thu Jan 24 01:21:48 2013
@@ -84,35 +84,6 @@ module Buildr::Scala
DEFAULT_SBT_VERSION = '0.12.0'
DEFAULT_JLINE_VERSION = '1.0'
- # The scalac compiler jars are added to classpath at load time,
- # if you want to customize artifact versions, you must set them on the
- #
- # artifact_ns['Buildr::Compiler::Scalac'].library = '2.7.5'
- #
- # namespace before this file is required. This is of course, only
- # if SCALA_HOME is not set or invalid.
- REQUIRES = ArtifactNamespace.for(self) do |ns|
- version = Buildr.settings.build['scala.version'] || DEFAULT_VERSION
- ns.library! 'org.scala-lang:scala-library:jar:>=' + version
- ns.compiler! 'org.scala-lang:scala-compiler:jar:>=' + version
- unless ::Buildr::Scala.version?(2.7, 2.8, 2.9)
- # added in Scala 2.10
- ns.reflect! 'org.scala-lang:scala-reflect:jar:>=' + version
- ns.actors! 'org.scala-lang:scala-actors:jar:>=' + version
- end
- end
-
- ZINC_REQUIRES = ArtifactNamespace.for(self) do |ns|
- zinc_version = Buildr.settings.build['zinc.version'] || DEFAULT_ZINC_VERSION
- sbt_version = Buildr.settings.build['sbt.version'] || DEFAULT_SBT_VERSION
- jline_version = Buildr.settings.build['jline.version'] || DEFAULT_JLINE_VERSION
- ns.zinc! "com.typesafe.zinc:zinc:jar:>=#{zinc_version}"
- ns.sbt_interface! "com.typesafe.sbt:sbt-interface:jar:>=#{sbt_version}"
- ns.incremental! "com.typesafe.sbt:incremental-compiler:jar:>=#{sbt_version}"
- ns.compiler_interface_sources! "com.typesafe.sbt:compiler-interface:jar:sources:>=#{sbt_version}"
- ns.jline! "jline:jline:jar:>=#{jline_version}"
- end
-
class << self
def scala_home
env_home = ENV['SCALA_HOME']
@@ -161,6 +132,35 @@ module Buildr::Scala
end
end
+ # The scalac compiler jars are added to classpath at load time,
+ # if you want to customize artifact versions, you must set them on the
+ #
+ # artifact_ns['Buildr::Compiler::Scalac'].library = '2.7.5'
+ #
+ # namespace before this file is required. This is of course, only
+ # if SCALA_HOME is not set or invalid.
+ REQUIRES = ArtifactNamespace.for(self) do |ns|
+ version = Buildr.settings.build['scala.version'] || DEFAULT_VERSION
+ ns.library! 'org.scala-lang:scala-library:jar:>=' + version
+ ns.compiler! 'org.scala-lang:scala-compiler:jar:>=' + version
+ unless Buildr::Scala.version?(2.7, 2.8, 2.9)
+ # added in Scala 2.10
+ ns.reflect! 'org.scala-lang:scala-reflect:jar:>=' + version
+ ns.actors! 'org.scala-lang:scala-actors:jar:>=' + version
+ end
+ end
+
+ ZINC_REQUIRES = ArtifactNamespace.for(self) do |ns|
+ zinc_version = Buildr.settings.build['zinc.version'] || DEFAULT_ZINC_VERSION
+ sbt_version = Buildr.settings.build['sbt.version'] || DEFAULT_SBT_VERSION
+ jline_version = Buildr.settings.build['jline.version'] || DEFAULT_JLINE_VERSION
+ ns.zinc! "com.typesafe.zinc:zinc:jar:>=#{zinc_version}"
+ ns.sbt_interface! "com.typesafe.sbt:sbt-interface:jar:>=#{sbt_version}"
+ ns.incremental! "com.typesafe.sbt:incremental-compiler:jar:>=#{sbt_version}"
+ ns.compiler_interface_sources! "com.typesafe.sbt:compiler-interface:jar:sources:>=#{sbt_version}"
+ ns.jline! "jline:jline:jar:>=#{jline_version}"
+ end
+
Javac = Buildr::Compiler::Javac
OPTIONS = [:warnings, :deprecation, :optimise, :target, :debug, :other, :javac]