BUILD 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. load("@rules_proto//proto:defs.bzl", "proto_library")
  15. load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
  16. load("//bazel:grpc_build_system.bzl", "grpc_proto_library")
  17. load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")
  18. licenses(["notice"])
  19. package(default_visibility = ["//visibility:public"])
  20. grpc_proto_library(
  21. name = "auth_sample",
  22. srcs = ["auth_sample.proto"],
  23. )
  24. grpc_proto_library(
  25. name = "hellostreamingworld",
  26. srcs = ["hellostreamingworld.proto"],
  27. )
  28. # The following three rules demonstrate the usage of the cc_grpc_library rule in
  29. # in a mode compatible with the native proto_library and cc_proto_library rules.
  30. proto_library(
  31. name = "helloworld_proto",
  32. srcs = ["helloworld.proto"],
  33. )
  34. cc_proto_library(
  35. name = "helloworld_cc_proto",
  36. deps = [":helloworld_proto"],
  37. )
  38. cc_grpc_library(
  39. name = "helloworld_cc_grpc",
  40. srcs = [":helloworld_proto"],
  41. grpc_only = True,
  42. deps = [":helloworld_cc_proto"],
  43. )
  44. grpc_proto_library(
  45. name = "route_guide",
  46. srcs = ["route_guide.proto"],
  47. )
  48. proto_library(
  49. name = "keyvaluestore_proto",
  50. srcs = ["keyvaluestore.proto"],
  51. )
  52. grpc_proto_library(
  53. name = "keyvaluestore",
  54. srcs = ["keyvaluestore.proto"],
  55. )
  56. py_proto_library(
  57. name = "helloworld_py_pb2",
  58. deps = [":helloworld_proto"],
  59. )
  60. py_grpc_library(
  61. name = "helloworld_py_pb2_grpc",
  62. srcs = [":helloworld_proto"],
  63. deps = [":helloworld_py_pb2"],
  64. )
  65. proto_library(
  66. name = "route_guide_proto",
  67. srcs = [":route_guide.proto"],
  68. )