From 27e2b57830c328b83286e055752bf92790587953 Mon Sep 17 00:00:00 2001 From: Isaiah Peng Date: Wed, 24 Dec 2014 15:48:41 +0100 Subject: add jruby support by protobuf-java reflection API --- ruby/google-protobuf.gemspec | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'ruby/google-protobuf.gemspec') diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index 371009bb..4c9449d2 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec @@ -1,10 +1,3 @@ -class << Gem::Specification - def find_c_source(dir) - `cd #{dir}; git ls-files "*.c" "*.h" extconf.rb Makefile`.split - .map{|f| "#{dir}/#{f}"} - end -end - Gem::Specification.new do |s| s.name = "google-protobuf" s.version = "3.0.0.alpha.3.0.pre" @@ -14,11 +7,17 @@ Gem::Specification.new do |s| s.authors = ["Protobuf Authors"] s.email = "protobuf@googlegroups.com" s.require_paths = ["lib"] - s.extensions = ["ext/google/protobuf_c/extconf.rb"] - s.files = ["lib/google/protobuf.rb"] + - # extension C source - find_c_source("ext/google/protobuf_c") - s.test_files = ["tests/basic.rb", - "tests/stress.rb", - "tests/generated_code_test.rb"] + s.files = ["lib/google/protobuf.rb"] + unless RUBY_PLATFORM == "java" + s.files += `git ls-files "*.c" "*.h" extconf.rb Makefile`.split + s.extensions= ["ext/google/protobuf_c/extconf.rb"] + else + s.files += ["lib/google/protobuf_java.jar"] + end + s.test_files = ["tests/basic.rb", + "tests/stress.rb", + "tests/generated_code_test.rb"] + s.add_development_dependency "rake-compiler" + s.add_development_dependency "test-unit" + s.add_development_dependency "rubygems-tasks" end -- cgit v1.2.3