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 15load("@rules_proto//proto:defs.bzl", "proto_library") 16load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") 17load("//bazel:grpc_build_system.bzl", "grpc_proto_library") 18load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library") 19 20licenses(["notice"]) 21 22package(default_visibility = ["//visibility:public"]) 23 24grpc_proto_library( 25 name = "auth_sample", 26 srcs = ["auth_sample.proto"], 27) 28 29grpc_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. 36proto_library( 37 name = "helloworld_proto", 38 srcs = ["helloworld.proto"], 39) 40 41cc_proto_library( 42 name = "helloworld_cc_proto", 43 deps = [":helloworld_proto"], 44) 45 46cc_grpc_library( 47 name = "helloworld_cc_grpc", 48 srcs = [":helloworld_proto"], 49 grpc_only = True, 50 deps = [":helloworld_cc_proto"], 51) 52 53grpc_proto_library( 54 name = "route_guide", 55 srcs = ["route_guide.proto"], 56) 57 58proto_library( 59 name = "keyvaluestore_proto", 60 srcs = ["keyvaluestore.proto"], 61) 62 63grpc_proto_library( 64 name = "keyvaluestore", 65 srcs = ["keyvaluestore.proto"], 66) 67 68py_proto_library( 69 name = "helloworld_py_pb2", 70 deps = [":helloworld_proto"], 71) 72 73py_grpc_library( 74 name = "helloworld_py_pb2_grpc", 75 srcs = [":helloworld_proto"], 76 deps = [":helloworld_py_pb2"], 77) 78 79proto_library( 80 name = "route_guide_proto", 81 srcs = [":route_guide.proto"], 82) 83