| Path: | History.txt |
| Last Update: | Mon Nov 22 23:35:00 -0500 2010 |
Rake::JavaExtensionTask.new('my_java_extension', GEM_SPEC) do |ext|
# most of ExtensionTask options can be used
# plus, java_compiling:
ext.java_compiling do |gem_spec|
gem_spec.post_install_message = "This is a native JRuby gem!"
end
end
Please note that cross-compiling JRuby gems requires either JRUBY_HOME or JRUBY_PARENT_CLASSPATH environment variables being properly set.
Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext|
ext.cross_compile = true
# ...
ext.cross_compiling do |gem_spec|
gem_spec.post_install_message = "You've installed a binary version of this gem"
end
end
For a workaround, look here: gist.github.com/251663
rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1
Will package extensions for 1.8 and 1.9 versions of Ruby.
rake cross compile RUBY_CC_VERSION=1.9.1
Please perform rake clobber prior compiling again.
rake-compiler cross-ruby VERSION=1.9.1-p0 SOURCE=http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext|
ext.cross_compile = true
ext.cross_platform = ['i386-mswin32', 'i386-mingw32']
end
Rake::ExtensionTask.new('my_extension') do |ext|
ext.ext_dir = 'custom/location' # look into custom/location
end # instead of ext/my_extension
rake cross compile RUBY_CC_VERSION=1.8