Created
September 4, 2011 10:29
-
-
Save IndianGuru/1192639 to your computer and use it in GitHub Desktop.
Rakefile for combining into a jar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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