BUILD.bazel 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. load("@rules_proto//proto:defs.bzl", "proto_library")
  2. # This is an API workspace, having public visibility by default makes perfect sense.
  3. package(default_visibility = ["//visibility:public"])
  4. ##############################################################################
  5. # Common
  6. ##############################################################################
  7. load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
  8. proto_library(
  9. name = "operations_proto",
  10. srcs = ["operations.proto"],
  11. deps = [
  12. "//google/api:annotations_proto",
  13. "//google/api:client_proto",
  14. "//google/rpc:status_proto",
  15. "@com_google_protobuf//:any_proto",
  16. "@com_google_protobuf//:descriptor_proto",
  17. "@com_google_protobuf//:duration_proto",
  18. "@com_google_protobuf//:empty_proto",
  19. ],
  20. )
  21. proto_library_with_info(
  22. name = "longrunning_proto_with_info",
  23. deps = [":operations_proto"],
  24. )
  25. ##############################################################################
  26. # Java
  27. ##############################################################################
  28. load(
  29. "@com_google_googleapis_imports//:imports.bzl",
  30. "java_gapic_assembly_gradle_pkg",
  31. "java_grpc_library",
  32. "java_proto_library",
  33. )
  34. java_proto_library(
  35. name = "longrunning_java_proto",
  36. deps = [":operations_proto"],
  37. )
  38. java_grpc_library(
  39. name = "longrunning_java_grpc",
  40. srcs = [":operations_proto"],
  41. deps = [":longrunning_java_proto"],
  42. )
  43. # Please DO-NOT-REMOVE this section.
  44. # This is required to generate java files for these protos.
  45. # Open Source Packages
  46. java_gapic_assembly_gradle_pkg(
  47. name = "google-longrunning-java",
  48. transport = "grpc+rest",
  49. deps = [
  50. ":longrunning_java_grpc",
  51. ":longrunning_java_proto",
  52. ":operations_proto",
  53. ],
  54. )
  55. ##############################################################################
  56. # Go
  57. ##############################################################################
  58. load(
  59. "@com_google_googleapis_imports//:imports.bzl",
  60. "go_gapic_assembly_pkg",
  61. "go_gapic_library",
  62. "go_proto_library",
  63. )
  64. go_proto_library(
  65. name = "longrunning_go_proto",
  66. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  67. importpath = "google.golang.org/genproto/googleapis/longrunning",
  68. protos = [":operations_proto"],
  69. visibility = ["//visibility:public"],
  70. deps = [
  71. "//google/api:annotations_go_proto",
  72. "//google/rpc:status_go_proto",
  73. ],
  74. )
  75. go_gapic_library(
  76. name = "longrunning_go_gapic",
  77. srcs = [":longrunning_proto_with_info"],
  78. grpc_service_config = "longrunning_grpc_service_config.json",
  79. importpath = "cloud.google.com/go/longrunning/autogen;longrunning",
  80. rest_numeric_enums = False,
  81. service_yaml = "//google/longrunning:longrunning.yaml",
  82. transport = "grpc+rest",
  83. deps = [":longrunning_go_proto"],
  84. )
  85. # Open Source Packages
  86. go_gapic_assembly_pkg(
  87. name = "gapi-cloud-longrunning-go",
  88. deps = [
  89. ":longrunning_go_gapic",
  90. ":longrunning_go_proto",
  91. ],
  92. )
  93. ##############################################################################
  94. # C++
  95. ##############################################################################
  96. load(
  97. "@com_google_googleapis_imports//:imports.bzl",
  98. "cc_grpc_library",
  99. "cc_proto_library",
  100. )
  101. cc_proto_library(
  102. name = "longrunning_cc_proto",
  103. deps = [":operations_proto"],
  104. )
  105. cc_grpc_library(
  106. name = "longrunning_cc_grpc",
  107. srcs = [":operations_proto"],
  108. grpc_only = True,
  109. deps = [":longrunning_cc_proto"],
  110. )
  111. ##############################################################################
  112. # C#
  113. ##############################################################################
  114. load(
  115. "@com_google_googleapis_imports//:imports.bzl",
  116. "csharp_gapic_assembly_pkg",
  117. "csharp_gapic_library",
  118. "csharp_grpc_library",
  119. "csharp_proto_library",
  120. )
  121. csharp_proto_library(
  122. name = "longrunning_csharp_proto",
  123. deps = [":operations_proto"],
  124. )
  125. csharp_grpc_library(
  126. name = "longrunning_csharp_grpc",
  127. srcs = [":operations_proto"],
  128. deps = [":longrunning_csharp_proto"],
  129. )
  130. csharp_gapic_library(
  131. name = "longrunning_csharp_gapic",
  132. srcs = [":longrunning_proto_with_info"],
  133. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  134. grpc_service_config = "longrunning_grpc_service_config.json",
  135. rest_numeric_enums = False,
  136. service_yaml = "//google/longrunning:longrunning.yaml",
  137. deps = [
  138. ":longrunning_csharp_grpc",
  139. ":longrunning_csharp_proto",
  140. ],
  141. )
  142. # Open Source Packages
  143. csharp_gapic_assembly_pkg(
  144. name = "google-longrunning-csharp",
  145. deps = [
  146. ":longrunning_csharp_gapic",
  147. ":longrunning_csharp_grpc",
  148. ":longrunning_csharp_proto",
  149. ],
  150. )
  151. ##############################################################################
  152. # PHP
  153. ##############################################################################
  154. load(
  155. "@com_google_googleapis_imports//:imports.bzl",
  156. "php_gapic_assembly_pkg",
  157. "php_gapic_library",
  158. "php_grpc_library",
  159. "php_proto_library",
  160. )
  161. php_proto_library(
  162. name = "longrunning_php_proto",
  163. deps = [":operations_proto"],
  164. )
  165. php_grpc_library(
  166. name = "longrunning_php_grpc",
  167. srcs = [":operations_proto"],
  168. deps = [":longrunning_php_proto"],
  169. )
  170. php_gapic_library(
  171. name = "longrunning_php_gapic",
  172. srcs = [":longrunning_proto_with_info"],
  173. grpc_service_config = "longrunning_grpc_service_config.json",
  174. rest_numeric_enums = False,
  175. service_yaml = "//google/longrunning:longrunning.yaml",
  176. transport = "grpc+rest",
  177. deps = [
  178. ":longrunning_php_grpc",
  179. ":longrunning_php_proto",
  180. ],
  181. )
  182. # Open Source Packages
  183. php_gapic_assembly_pkg(
  184. name = "google-longrunning-php",
  185. deps = [
  186. ":longrunning_php_gapic",
  187. ":longrunning_php_grpc",
  188. ":longrunning_php_proto",
  189. ],
  190. )