I have a rakefile that includes the following:
Jeweler::Tasks.new do |gem|
gem.add_dependency('json')
end
The gemspec created creates a gem that cannot be installed on jruby because the json gem is native.
For jruby, this should be:
Jeweler::Tasks.new do |gem|
gem.add_dependency('json-jruby')
end
How can I conditionally add a dependency for 'json-jruby' when RUBY_ENGINE == 'java'?
It seems like my only option is to manually edit the gemspec file that the jeweler creates to add the RUBY_ENGINE check. But I would prefer to avoid this, because it seems to hit the purpose of using a jeweler in the first place.
Any ideas?
source
share