BUILD.bazel 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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
  21. # subpackages.
  22. proto_library(
  23. name = "common_proto",
  24. srcs = glob(["*.proto"]),
  25. deps = [
  26. "//google/ads/googleads/v12/enums:enums_proto",
  27. "//google/api:annotations_proto",
  28. "//google/api:field_behavior_proto",
  29. "//google/api:resource_proto",
  30. "@com_google_protobuf//:wrappers_proto",
  31. ],
  32. )
  33. ##############################################################################
  34. # Java
  35. ##############################################################################
  36. load(
  37. "@com_google_googleapis_imports//:imports.bzl",
  38. "java_proto_library",
  39. )
  40. java_proto_library(
  41. name = "common_java_proto",
  42. deps = [":common_proto"],
  43. )
  44. ##############################################################################
  45. # PHP
  46. ##############################################################################
  47. # PHP targets are in the parent directory's BUILD.bazel file to facilitate
  48. # aggregating metadata using a single underlying call to protoc.
  49. ##############################################################################
  50. # C#
  51. ##############################################################################
  52. load(
  53. "@com_google_googleapis_imports//:imports.bzl",
  54. "csharp_proto_library",
  55. )
  56. csharp_proto_library(
  57. name = "common_csharp_proto",
  58. deps = [":common_proto"],
  59. )
  60. ##############################################################################
  61. # Ruby
  62. ##############################################################################
  63. load(
  64. "@com_google_googleapis_imports//:imports.bzl",
  65. "ruby_proto_library",
  66. )
  67. ruby_proto_library(
  68. name = "common_ruby_proto",
  69. deps = [":common_proto"],
  70. )
  71. ##############################################################################
  72. # Python
  73. ##############################################################################
  74. load(
  75. "@com_google_googleapis_imports//:imports.bzl",
  76. "py_proto_library",
  77. )
  78. py_proto_library(
  79. name = "common_py_proto",
  80. deps = [":common_proto"],
  81. )