Skip to content

Commit

Permalink
Rubygems 3.2 supports --platform option
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jan 16, 2021
1 parent 7b7681b commit c8046fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -25,7 +25,7 @@ task 'build:java' => 'date_epoch' do |t|
gem_command = ENV["GEM_COMMAND"]
gem_command &&= gem_command.shellsplit
Bundler::GemHelper.instance.instance_eval do
sh([*(gem_command || "gem"), "build", "-V", specfile, "--", "--platform=java"]) do
sh([*(gem_command || "gem"), "build", "-V", "--platform=java", specfile]) do
FileUtils.mkdir_p("pkg")
FileUtils.mv(file_name, "pkg")
Bundler.ui.confirm "#{spec.name} #{spec.version} built to pkg/#{file_name}."
Expand Down
5 changes: 0 additions & 5 deletions io-console.gemspec
Expand Up @@ -22,11 +22,6 @@ Gem::Specification.new do |s|
]
s.extensions = %w[ext/io/console/extconf.rb]

if i = ARGV.index("--") and !(argv = ARGV[i+1..-1]).empty?
OptionParser.new(__FILE__) do |opt|
opt.on("--platform=PLATFORM") {|p| s.platform = p}
end.parse!(argv)
end
if Gem::Platform === s.platform and s.platform =~ 'java'
s.files.delete_if {|f| f.start_with?("ext/")}
s.extensions.clear
Expand Down

0 comments on commit c8046fd

Please sign in to comment.