Class: Ritual::Extension::JRuby
- Defined in:
- lib/ritual/extension/jruby.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#build_path, #install_path, #name, #path, #task_name
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Ritual::Extension::Base
Instance Method Details
#define_tasks ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ritual/extension/jruby.rb', line 4 def define_tasks task 'gem:build' => task_name desc "Build the #{name} extension." task task_name do relative_install_path = relative_path(install_path) relative_compiled_paths = compiled_paths.map { |p| relative_path(p) } class_path = "#{RbConfig::CONFIG['prefix']}/lib/jruby.jar" sh 'javac', '-g', '-classpath', class_path, *source_paths Dir.chdir path do mkdir_p File.dirname(relative_install_path) sh 'jar', 'cf', relative_install_path.to_s, *relative_compiled_paths.map(&:to_s) end end end |
#source_paths ⇒ Object
20 21 22 |
# File 'lib/ritual/extension/jruby.rb', line 20 def source_paths @source_paths ||= FileList["#{path}/**/*.java"] end |