Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
1f8b6da9
Commit
1f8b6da9
authored
Apr 29, 2016
by
Nicolas "Pixel" Noble
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Few tweaks to the rakefile to permit native gems compilation with the proto files generation.
parent
cbb6b285
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
32 deletions
+36
-32
Gemfile.lock
ruby/Gemfile.lock
+1
-1
Rakefile
ruby/Rakefile
+34
-30
google-protobuf.gemspec
ruby/google-protobuf.gemspec
+1
-1
No files found.
ruby/Gemfile.lock
View file @
1f8b6da9
PATH
remote: .
specs:
google-protobuf (3.0.0.alpha.5.0)
google-protobuf (3.0.0.alpha.5.0
.5
)
GEM
remote: https://rubygems.org/
...
...
ruby/Rakefile
View file @
1f8b6da9
...
...
@@ -5,6 +5,38 @@ require "rake/testtask"
spec
=
Gem
::
Specification
.
load
(
"google-protobuf.gemspec"
)
well_known_protos
=
%w[
google/protobuf/any.proto
google/protobuf/api.proto
google/protobuf/duration.proto
google/protobuf/empty.proto
google/protobuf/field_mask.proto
google/protobuf/source_context.proto
google/protobuf/struct.proto
google/protobuf/timestamp.proto
google/protobuf/type.proto
google/protobuf/wrappers.proto
]
# These are omitted for now because we don't support proto2.
proto2_protos
=
%w[
google/protobuf/descriptor.proto
google/protobuf/compiler/plugin.proto
]
genproto_output
=
[]
unless
ENV
[
'IN_DOCKER'
]
==
'true'
well_known_protos
.
each
do
|
proto_file
|
input_file
=
"../src/"
+
proto_file
output_file
=
"lib/"
+
proto_file
.
sub
(
/\.proto$/
,
".rb"
)
genproto_output
<<
output_file
file
output_file
=>
input_file
do
|
file_task
|
sh
"../src/protoc -I../src --ruby_out=lib
#{
input_file
}
"
end
end
end
if
RUBY_PLATFORM
==
"java"
if
`which mvn`
==
''
raise
ArgumentError
,
"maven needs to be installed"
...
...
@@ -30,38 +62,10 @@ else
task
'gem:windows'
do
require
'rake_compiler_dock'
RakeCompilerDock
.
sh
"bundle &&
rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6
"
RakeCompilerDock
.
sh
"bundle &&
IN_DOCKER=true rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0
"
end
end
well_known_protos
=
%w[
google/protobuf/any.proto
google/protobuf/api.proto
google/protobuf/duration.proto
google/protobuf/empty.proto
google/protobuf/field_mask.proto
google/protobuf/source_context.proto
google/protobuf/struct.proto
google/protobuf/timestamp.proto
google/protobuf/type.proto
google/protobuf/wrappers.proto
]
# These are omitted for now because we don't support proto2.
proto2_protos
=
%w[
google/protobuf/descriptor.proto
google/protobuf/compiler/plugin.proto
]
genproto_output
=
[]
well_known_protos
.
each
do
|
proto_file
|
input_file
=
"../src/"
+
proto_file
output_file
=
"lib/"
+
proto_file
.
sub
(
/\.proto$/
,
".rb"
)
genproto_output
<<
output_file
file
output_file
=>
input_file
do
|
file_task
|
sh
"../src/protoc -I../src --ruby_out=lib
#{
input_file
}
"
end
task
'gem:native'
=>
[
:genproto
,
'gem:windows'
]
end
...
...
ruby/google-protobuf.gemspec
View file @
1f8b6da9
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
"google-protobuf"
s
.
version
=
"3.0.0.alpha.5.0"
s
.
version
=
"3.0.0.alpha.5.0
.5
"
s
.
licenses
=
[
"BSD"
]
s
.
summary
=
"Protocol Buffers"
s
.
description
=
"Protocol Buffers are Google's data interchange format."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment