Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: third_party/protobuf/ruby/Rakefile

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/protobuf/ruby/README.md ('k') | third_party/protobuf/ruby/ext/google/protobuf_c/defs.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/ruby/Rakefile
diff --git a/third_party/protobuf/ruby/Rakefile b/third_party/protobuf/ruby/Rakefile
new file mode 100644
index 0000000000000000000000000000000000000000..c25103d819d1a422f78976a318ae0d016f462198
--- /dev/null
+++ b/third_party/protobuf/ruby/Rakefile
@@ -0,0 +1,36 @@
+require "rubygems"
+require "rubygems/package_task"
+require "rake/extensiontask" unless RUBY_PLATFORM == "java"
+require "rake/testtask"
+
+spec = Gem::Specification.load("google-protobuf.gemspec")
+
+if RUBY_PLATFORM == "java"
+ if `which mvn` == ''
+ raise ArgumentError, "maven needs to be installed"
+ end
+ task :clean do
+ system("mvn clean")
+ end
+
+ task :compile do
+ system("mvn package")
+ end
+else
+ Rake::ExtensionTask.new("protobuf_c", spec) do |ext|
+ ext.ext_dir = "ext/google/protobuf_c"
+ ext.lib_dir = "lib/google"
+ end
+end
+
+Gem::PackageTask.new(spec) do |pkg|
+end
+
+Rake::TestTask.new(:test => :build) do |t|
+ t.test_files = FileList["tests/*.rb"]
+end
+
+task :build => [:clean, :compile]
+task :default => [:build]
+
+# vim:sw=2:et
« no previous file with comments | « third_party/protobuf/ruby/README.md ('k') | third_party/protobuf/ruby/ext/google/protobuf_c/defs.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698