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
ea188666
Commit
ea188666
authored
Feb 25, 2016
by
Steven Parkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass correct args to protoc for java wellknown protos when used as an external repository
parent
48ebb29a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
BUILD
BUILD
+2
-9
protobuf.bzl
protobuf.bzl
+25
-0
No files found.
BUILD
View file @
ea188666
...
...
@@ -22,6 +22,7 @@ load(
"protobuf",
"cc_proto_library",
"py_proto_library",
"internal_gen_well_known_protos_java",
"internal_protobuf_py_tests",
)
...
...
@@ -457,16 +458,8 @@ cc_test(
################################################################################
# Java support
################################################################################
genrule(
name = "gen_well_known_protos_java",
internal_gen_well_known_protos_java(
srcs = WELL_KNOWN_PROTOS,
outs = [
"wellknown.srcjar",
],
cmd = "$(location :protoc) --java_out=$(@D)/wellknown.jar" +
" -Isrc $(SRCS) " +
" && mv $(@D)/wellknown.jar $(@D)/wellknown.srcjar",
tools = [":protoc"],
)
java_library(
...
...
protobuf.bzl
View file @
ea188666
...
...
@@ -199,6 +199,31 @@ def cc_proto_library(
includes
=
includes
,
**
kargs
)
def
internal_gen_well_known_protos_java
(
srcs
):
"""Bazel rule to generate the gen_well_known_protos_java genrule
Args:
srcs: the well known protos
"""
root
=
Label
(
"
%
s//protobuf_java"
%
(
REPOSITORY_NAME
))
.
workspace_root
if
root
==
""
:
include
=
" -Isrc "
else
:
include
=
" -I
%
s/src "
%
root
native
.
genrule
(
name
=
"gen_well_known_protos_java"
,
srcs
=
srcs
,
outs
=
[
"wellknown.srcjar"
,
],
cmd
=
"$(location :protoc) --java_out=$(@D)/wellknown.jar"
+
"
%
s $(SRCS) "
%
include
+
" && mv $(@D)/wellknown.jar $(@D)/wellknown.srcjar"
,
tools
=
[
":protoc"
],
)
def
py_proto_library
(
name
,
srcs
=
[],
...
...
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