Class: Buildr::Shell::Clojure
- Includes:
- JavaRebel
- Defined in:
- lib/buildr/core/shell.rb
Constant Summary collapse
- JLINE_VERSION =
'0.9.94'
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#build? ⇒ Boolean
don’t build if it’s only Clojure sources.
- #launch ⇒ Object
Methods included from JavaRebel
#rebel_args, #rebel_home, #rebel_props
Methods inherited from Base
Constructor Details
This class inherits a constructor from Buildr::Shell::Base
Class Method Details
.lang ⇒ Object
145 146 147 |
# File 'lib/buildr/core/shell.rb', line 145 def lang :none end |
.to_sym ⇒ Object
149 150 151 |
# File 'lib/buildr/core/shell.rb', line 149 def to_sym :clj # more common than `clojure` end |
Instance Method Details
#build? ⇒ Boolean
don’t build if it’s only Clojure sources
155 156 157 |
# File 'lib/buildr/core/shell.rb', line 155 def build? !has_source?(:clojure) or has_source?(:java) or has_source?(:scala) or has_source?(:groovy) end |
#launch ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/buildr/core/shell.rb', line 159 def launch fail 'Are we forgetting something? CLOJURE_HOME not set.' unless clojure_home cp = project.compile.dependencies + [ if build? project.path_to(:target, :classes) else project.path_to(:src, :main, :clojure) end, File.('clojure.jar', clojure_home), 'jline:jline:jar:0.9.94' ] if build? Java::Commands.java 'jline.ConsoleRunner', 'clojure.lang.Repl', { :properties => rebel_props(project), :classpath => cp, :java_args => rebel_args } else Java::Commands.java 'jline.ConsoleRunner', 'clojure.lang.Repl', :classpath => cp end end |