BUILD.bazel 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. # This is an API workspace, having public visibility by default makes perfect sense.
  2. package(default_visibility = ["//visibility:public"])
  3. ##############################################################################
  4. # Common
  5. ##############################################################################
  6. load("@rules_proto//proto:defs.bzl", "proto_library")
  7. load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
  8. proto_library(
  9. name = "storage_proto",
  10. srcs = [
  11. "arrow.proto",
  12. "avro.proto",
  13. "protobuf.proto",
  14. "storage.proto",
  15. "stream.proto",
  16. "table.proto",
  17. ],
  18. deps = [
  19. "//google/api:annotations_proto",
  20. "//google/api:client_proto",
  21. "//google/api:field_behavior_proto",
  22. "//google/api:resource_proto",
  23. "//google/rpc:status_proto",
  24. "@com_google_protobuf//:descriptor_proto",
  25. "@com_google_protobuf//:empty_proto",
  26. "@com_google_protobuf//:timestamp_proto",
  27. "@com_google_protobuf//:wrappers_proto",
  28. ],
  29. )
  30. proto_library_with_info(
  31. name = "storage_proto_with_info",
  32. deps = [
  33. ":storage_proto",
  34. "//google/cloud:common_resources_proto",
  35. ],
  36. )
  37. ##############################################################################
  38. # Java
  39. ##############################################################################
  40. load(
  41. "@com_google_googleapis_imports//:imports.bzl",
  42. "java_gapic_assembly_gradle_pkg",
  43. "java_gapic_library",
  44. "java_gapic_test",
  45. "java_grpc_library",
  46. "java_proto_library",
  47. )
  48. java_proto_library(
  49. name = "storage_java_proto",
  50. deps = [":storage_proto"],
  51. )
  52. java_grpc_library(
  53. name = "storage_java_grpc",
  54. srcs = [":storage_proto"],
  55. deps = [":storage_java_proto"],
  56. )
  57. java_gapic_library(
  58. name = "storage_java_gapic",
  59. srcs = [":storage_proto_with_info"],
  60. gapic_yaml = "bigquerystorage_gapic.yaml",
  61. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  62. test_deps = [
  63. ":storage_java_grpc",
  64. ],
  65. deps = [
  66. ":storage_java_proto",
  67. ],
  68. )
  69. java_gapic_test(
  70. name = "storage_java_gapic_test_suite",
  71. test_classes = [
  72. "com.google.cloud.bigquery.storage.v1beta2.BaseBigQueryReadClientTest",
  73. ],
  74. runtime_deps = [":storage_java_gapic_test"],
  75. )
  76. # Open Source Packages
  77. java_gapic_assembly_gradle_pkg(
  78. name = "google-cloud-bigquery-storage-v1beta2-java",
  79. deps = [
  80. ":storage_java_gapic",
  81. ":storage_java_grpc",
  82. ":storage_java_proto",
  83. ":storage_proto",
  84. ],
  85. )
  86. ##############################################################################
  87. # Go
  88. ##############################################################################
  89. load(
  90. "@com_google_googleapis_imports//:imports.bzl",
  91. "go_gapic_assembly_pkg",
  92. "go_gapic_library",
  93. "go_proto_library",
  94. "go_test",
  95. )
  96. go_proto_library(
  97. name = "storage_go_proto",
  98. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  99. importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2",
  100. protos = [":storage_proto"],
  101. deps = [
  102. "//google/api:annotations_go_proto",
  103. "//google/rpc:status_go_proto",
  104. ],
  105. )
  106. go_gapic_library(
  107. name = "storage_go_gapic",
  108. srcs = [":storage_proto_with_info"],
  109. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  110. importpath = "cloud.google.com/go/bigquery/storage/apiv1beta2;storage",
  111. service_yaml = "bigquerystorage_v1beta2.yaml",
  112. deps = [
  113. ":storage_go_proto",
  114. ],
  115. )
  116. go_test(
  117. name = "storage_go_gapic_test",
  118. srcs = [":storage_go_gapic_srcjar_test"],
  119. embed = [":storage_go_gapic"],
  120. importpath = "cloud.google.com/go/bigquery/storage/apiv1beta2",
  121. )
  122. # Open Source Packages
  123. go_gapic_assembly_pkg(
  124. name = "gapi-cloud-bigquery-storage-v1beta2-go",
  125. deps = [
  126. ":storage_go_gapic",
  127. ":storage_go_gapic_srcjar-test.srcjar",
  128. ":storage_go_proto",
  129. ],
  130. )
  131. ##############################################################################
  132. # Python
  133. ##############################################################################
  134. load(
  135. "@com_google_googleapis_imports//:imports.bzl",
  136. "py_gapic_assembly_pkg",
  137. "py_gapic_library",
  138. )
  139. py_gapic_library(
  140. name = "storage_py_gapic",
  141. srcs = [":storage_proto"],
  142. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  143. opt_args = [
  144. "python-gapic-namespace=google.cloud",
  145. "python-gapic-name=bigquery_storage",
  146. ],
  147. )
  148. py_gapic_assembly_pkg(
  149. name = "bigquery-storage-v1beta2-py",
  150. deps = [
  151. ":storage_py_gapic",
  152. ],
  153. )
  154. ##############################################################################
  155. # PHP
  156. ##############################################################################
  157. load(
  158. "@com_google_googleapis_imports//:imports.bzl",
  159. "php_gapic_assembly_pkg",
  160. "php_gapic_library",
  161. "php_grpc_library",
  162. "php_proto_library",
  163. )
  164. php_proto_library(
  165. name = "storage_php_proto",
  166. deps = [":storage_proto"],
  167. )
  168. php_grpc_library(
  169. name = "storage_php_grpc",
  170. srcs = [":storage_proto"],
  171. deps = [":storage_php_proto"],
  172. )
  173. php_gapic_library(
  174. name = "storage_php_gapic",
  175. srcs = [":storage_proto_with_info"],
  176. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  177. deps = [
  178. ":storage_php_grpc",
  179. ":storage_php_proto",
  180. ],
  181. )
  182. # Open Source Packages
  183. php_gapic_assembly_pkg(
  184. name = "google-cloud-bigquery-storage-v1beta2-php",
  185. deps = [
  186. ":storage_php_gapic",
  187. ":storage_php_grpc",
  188. ":storage_php_proto",
  189. ],
  190. )
  191. ##############################################################################
  192. # Node.js
  193. ##############################################################################
  194. load(
  195. "@com_google_googleapis_imports//:imports.bzl",
  196. "nodejs_gapic_assembly_pkg",
  197. "nodejs_gapic_library",
  198. )
  199. nodejs_gapic_library(
  200. name = "storage_nodejs_gapic",
  201. src = ":storage_proto_with_info",
  202. extra_protoc_parameters = ["metadata"],
  203. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  204. package = "google.cloud.bigquery.storage.v1beta2",
  205. service_yaml = "bigquerystorage_v1beta2.yaml",
  206. deps = [],
  207. )
  208. nodejs_gapic_assembly_pkg(
  209. name = "bigquery-storage-v1beta2-nodejs",
  210. deps = [
  211. ":storage_nodejs_gapic",
  212. ":storage_proto",
  213. ],
  214. )
  215. ##############################################################################
  216. # Ruby
  217. ##############################################################################
  218. # load(
  219. # "@com_google_googleapis_imports//:imports.bzl",
  220. # "ruby_gapic_assembly_pkg",
  221. # "ruby_cloud_gapic_library",
  222. # "ruby_grpc_library",
  223. # "ruby_proto_library",
  224. # )
  225. # ruby_proto_library(
  226. # name = "storage_ruby_proto",
  227. # deps = [":storage_proto"],
  228. # )
  229. # ruby_grpc_library(
  230. # name = "storage_ruby_grpc",
  231. # srcs = [":storage_proto"],
  232. # deps = [":storage_ruby_proto"],
  233. # )
  234. # ruby_cloud_gapic_library(
  235. # name = "storage_ruby_gapic",
  236. # srcs = [":storage_proto_with_info",],
  237. # extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-bigquery-storage-v1beta2"],
  238. # deps = [
  239. # ":storage_ruby_grpc",
  240. # ":storage_ruby_proto",
  241. # ],
  242. # )
  243. # ruby_gapic_assembly_pkg(
  244. # name = "google-cloud-bigquery-storage-v1beta2-ruby",
  245. # deps = [
  246. # ":storage_ruby_gapic",
  247. # ":storage_ruby_grpc",
  248. # ":storage_ruby_proto",
  249. # ],
  250. # )
  251. ##############################################################################
  252. # C#
  253. ##############################################################################
  254. load(
  255. "@com_google_googleapis_imports//:imports.bzl",
  256. "csharp_gapic_assembly_pkg",
  257. "csharp_gapic_library",
  258. "csharp_grpc_library",
  259. "csharp_proto_library",
  260. )
  261. csharp_proto_library(
  262. name = "storage_csharp_proto",
  263. deps = [":storage_proto"],
  264. )
  265. csharp_grpc_library(
  266. name = "storage_csharp_grpc",
  267. srcs = [":storage_proto"],
  268. deps = [":storage_csharp_proto"],
  269. )
  270. csharp_gapic_library(
  271. name = "storage_csharp_gapic",
  272. srcs = [":storage_proto_with_info"],
  273. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  274. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  275. deps = [
  276. ":storage_csharp_grpc",
  277. ":storage_csharp_proto",
  278. ],
  279. )
  280. # Open Source Packages
  281. csharp_gapic_assembly_pkg(
  282. name = "google-cloud-bigquery-storage-v1beta2-csharp",
  283. deps = [
  284. ":storage_csharp_gapic",
  285. ":storage_csharp_grpc",
  286. ":storage_csharp_proto",
  287. ],
  288. )
  289. ##############################################################################
  290. # C++
  291. ##############################################################################
  292. load(
  293. "@com_google_googleapis_imports//:imports.bzl",
  294. "cc_grpc_library",
  295. "cc_proto_library",
  296. )
  297. cc_proto_library(
  298. name = "storage_cc_proto",
  299. deps = [":storage_proto"],
  300. )
  301. cc_grpc_library(
  302. name = "storage_cc_grpc",
  303. srcs = [":storage_proto"],
  304. generate_mocks = True,
  305. grpc_only = True,
  306. deps = [":storage_cc_proto"],
  307. )