BUILD.bazel 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 2020 Google LLC
  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. # https://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. package(default_visibility = ["//visibility:public"])
  15. ##############################################################################
  16. # Common
  17. ##############################################################################
  18. load("@rules_proto//proto:defs.bzl", "proto_library")
  19. # TODO(ohren): Change srcs to use an enumeration of each individual proto
  20. # instead of *.proto globbing once the build file generator supports subpackages.
  21. proto_library(
  22. name = "enums_proto",
  23. srcs = glob(["*.proto"]),
  24. deps = [
  25. "//google/api:annotations_proto",
  26. ],
  27. )
  28. ##############################################################################
  29. # Java
  30. ##############################################################################
  31. load(
  32. "@com_google_googleapis_imports//:imports.bzl",
  33. "java_proto_library",
  34. )
  35. java_proto_library(
  36. name = "enums_java_proto",
  37. deps = [":enums_proto"],
  38. )
  39. ##############################################################################
  40. # PHP
  41. ##############################################################################
  42. # PHP targets are in the parent directory's BUILD.bazel file to facilitate
  43. # aggregating metadata using a single underlying call to protoc.
  44. ##############################################################################
  45. # C#
  46. ##############################################################################
  47. load(
  48. "@com_google_googleapis_imports//:imports.bzl",
  49. "csharp_proto_library",
  50. )
  51. csharp_proto_library(
  52. name = "enums_csharp_proto",
  53. deps = [":enums_proto"],
  54. )
  55. ##############################################################################
  56. # Ruby
  57. ##############################################################################
  58. load(
  59. "@com_google_googleapis_imports//:imports.bzl",
  60. "ruby_proto_library",
  61. )
  62. ruby_proto_library(
  63. name = "enums_ruby_proto",
  64. deps = [":enums_proto"],
  65. )
  66. ##############################################################################
  67. # Python
  68. ##############################################################################
  69. load(
  70. "@com_google_googleapis_imports//:imports.bzl",
  71. "py_proto_library",
  72. )
  73. py_proto_library(
  74. name = "enums_py_proto",
  75. deps = [":enums_proto"],
  76. )