Class: Buildr::Scala::ScalaShell

Inherits:
Buildr::Shell::Base show all
Includes:
Buildr::Shell::JavaRebel
Defined in:
lib/buildr/scala/shell.rb

Instance Attribute Summary

Attributes inherited from Buildr::Shell::Base

#project

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Buildr::Shell::JavaRebel

#rebel_args, #rebel_home, #rebel_props

Methods inherited from Buildr::Shell::Base

#build?, #initialize

Constructor Details

This class inherits a constructor from Buildr::Shell::Base

Class Method Details

.langObject



26
27
28
# File 'lib/buildr/scala/shell.rb', line 26

def lang
  :scala
end

.to_symObject



30
31
32
# File 'lib/buildr/scala/shell.rb', line 30

def to_sym
  :scala
end

Instance Method Details

#launchObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/buildr/scala/shell.rb', line 35

def launch
  cp = project.compile.dependencies +
    Scalac.dependencies +
    [project.path_to(:target, :classes)]

  props = {
    'scala.home' => Scalac.scala_home
  }

  jline = [File.expand_path("lib/jline.jar", Scalac.scala_home)].find_all do |f|
    File.exist? f
  end

  Java::Commands.java 'scala.tools.nsc.MainGenericRunner',
                      '-cp', cp.join(File::PATH_SEPARATOR),
  {
    :properties => props.merge(rebel_props(project)),
    :classpath => Scalac.dependencies + jline,
    :java_args => rebel_args
  }
end