Skip to content

Instantly share code, notes, and snippets.

@IndianGuru
Created September 4, 2011 10:29
Show Gist options
  • Save IndianGuru/1192639 to your computer and use it in GitHub Desktop.
Save IndianGuru/1192639 to your computer and use it in GitHub Desktop.
Rakefile for combining into a jar
directory 'vendor'
desc 'Install Ruby gems into vendor/'
task :install_gems => 'vendor' do
sh 'jruby -S gem install -i vendor rubyzip'
end
desc 'Build Java launcher that will start the Ruby program'
task :build_launcher do
sh 'javac -cp jruby-complete.jar JavaLauncher.java'
end
desc 'Combine app and launcher into one jar'
task :my_jar => [:install_gems, :build_launcher] do
sh 'jar -cfm compress.jar my.manifest JavaLauncher.class compress.rb -C vendor .'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment