Class: Buildr::Shell::Clojure
- Includes:
- JRebel
- Defined in:
- lib/buildr/clojure/shell.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#build? ⇒ Boolean
don’t build if it’s only Clojure sources.
- #launch(task) ⇒ Object
Methods included from JRebel
#jrebel_args, #jrebel_home, #jrebel_props, #rebel_jar
Methods inherited from Base
Constructor Details
This class inherits a constructor from Buildr::Shell::Base
Instance Method Details
#build? ⇒ Boolean
don’t build if it’s only Clojure sources
24 25 26 |
# File 'lib/buildr/clojure/shell.rb', line 24 def build? !has_source?(:clojure) or has_source?(:java) or has_source?(:scala) or has_source?(:groovy) end |
#launch(task) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/buildr/clojure/shell.rb', line 28 def launch(task) cp = project.compile.dependencies + ::Buildr::Clojure.dependencies + [ build? ? project.path_to(:target, :classes) : project.path_to(:src, :main, :clojure) ] Java::Commands.java 'jline.ConsoleRunner', 'clojure.lang.Repl', { :properties => jrebel_props(project).merge(task.properties), :classpath => cp, :java_args => jrebel_args + task.java_args } end |