-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use separate Rakefile for native ext compilation
Signed-off-by: Alex Coles <alex@alexbcoles.com>
- Loading branch information
Showing
3 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
task :simple_compile do | ||
# Pick the right class path, depending if we're using an rvm installed JRuby | ||
jruby_cpath = ENV['MY_RUBY_HOME'] || ENV['JRUBY_HOME'] | ||
raise 'MY_RUBY_HOME or JRUBY_HOME are not set' unless jruby_cpath | ||
|
||
puts 'Doing a simple compilation' | ||
sh %(javac -source 1.6 -target 1.6 -cp #{jruby_cpath}/lib/jruby.jar ext/java/**/*.java) | ||
mkdir_p 'lib/jrubytesting' | ||
sh %(jar cf lib/jrubytesting/test_jruby_library.jar -C ext/java jrubytesting/TestJrubyLibraryService.class) | ||
puts | ||
end | ||
task :default => :simple_compile |
This file contains 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