| 1 |
# Copyright 2020 the gRPC authors. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
load("@rules_proto//proto:defs.bzl", "proto_library") |
| 16 |
load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") |
| 17 |
load("//bazel:grpc_build_system.bzl", "grpc_proto_library") |
| 18 |
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library") |
| 19 |
|
| 20 |
licenses(["notice"]) |
| 21 |
|
| 22 |
package(default_visibility = ["//visibility:public"]) |
| 23 |
|
| 24 |
grpc_proto_library( |
| 25 |
name = "auth_sample", |
| 26 |
srcs = ["auth_sample.proto"], |
| 27 |
) |
| 28 |
|
| 29 |
grpc_proto_library( |
| 30 |
name = "hellostreamingworld", |
| 31 |
srcs = ["hellostreamingworld.proto"], |
| 32 |
) |
| 33 |
|
| 34 |
# The following three rules demonstrate the usage of the cc_grpc_library rule in |
| 35 |
# in a mode compatible with the native proto_library and cc_proto_library rules. |
| 36 |
proto_library( |
| 37 |
name = "helloworld_proto", |
| 38 |
srcs = ["helloworld.proto"], |
| 39 |
) |
| 40 |
|
| 41 |
cc_proto_library( |
| 42 |
name = "helloworld_cc_proto", |
| 43 |
deps = [":helloworld_proto"], |
| 44 |
) |
| 45 |
|
| 46 |
cc_grpc_library( |
| 47 |
name = "helloworld_cc_grpc", |
| 48 |
srcs = [":helloworld_proto"], |
| 49 |
grpc_only = True, |
| 50 |
deps = [":helloworld_cc_proto"], |
| 51 |
) |
| 52 |
|
| 53 |
grpc_proto_library( |
| 54 |
name = "route_guide", |
| 55 |
srcs = ["route_guide.proto"], |
| 56 |
) |
| 57 |
|
| 58 |
proto_library( |
| 59 |
name = "keyvaluestore_proto", |
| 60 |
srcs = ["keyvaluestore.proto"], |
| 61 |
) |
| 62 |
|
| 63 |
grpc_proto_library( |
| 64 |
name = "keyvaluestore", |
| 65 |
srcs = ["keyvaluestore.proto"], |
| 66 |
) |
| 67 |
|
| 68 |
py_proto_library( |
| 69 |
name = "helloworld_py_pb2", |
| 70 |
deps = [":helloworld_proto"], |
| 71 |
) |
| 72 |
|
| 73 |
py_grpc_library( |
| 74 |
name = "helloworld_py_pb2_grpc", |
| 75 |
srcs = [":helloworld_proto"], |
| 76 |
deps = [":helloworld_py_pb2"], |
| 77 |
) |
| 78 |
|
| 79 |
proto_library( |
| 80 |
name = "route_guide_proto", |
| 81 |
srcs = [":route_guide.proto"], |
| 82 |
) |