BUILD.bazel 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. # This file was automatically generated by BuildFileGenerator
  2. # https://github.com/googleapis/rules_gapic/tree/master/bazel
  3. # Most of the manual changes to this file will be overwritten.
  4. # It's **only** allowed to change the following rule attribute values:
  5. # - names of *_gapic_assembly_* rules
  6. # - certain parameters of *_gapic_library rules, including but not limited to:
  7. # * extra_protoc_parameters
  8. # * extra_protoc_file_parameters
  9. # The complete list of preserved parameters can be found in the source code.
  10. ##############################################################################
  11. # Common
  12. ##############################################################################
  13. load("@rules_proto//proto:defs.bzl", "proto_library")
  14. load(
  15. "@com_google_googleapis_imports//:imports.bzl",
  16. "csharp_gapic_assembly_pkg",
  17. "csharp_gapic_library",
  18. "csharp_grpc_library",
  19. "csharp_proto_library",
  20. "go_gapic_assembly_pkg",
  21. "go_gapic_library",
  22. "go_proto_library",
  23. "go_test",
  24. "java_gapic_assembly_gradle_pkg",
  25. "java_gapic_library",
  26. "java_gapic_test",
  27. "java_grpc_library",
  28. "java_proto_library",
  29. "nodejs_gapic_assembly_pkg",
  30. "nodejs_gapic_library",
  31. "php_gapic_assembly_pkg",
  32. "php_gapic_library",
  33. "php_grpc_library",
  34. "php_proto_library",
  35. "proto_library_with_info",
  36. "py_gapic_assembly_pkg",
  37. "py_gapic_library",
  38. "ruby_cloud_gapic_library",
  39. "ruby_gapic_assembly_pkg",
  40. "ruby_grpc_library",
  41. "ruby_proto_library",
  42. )
  43. # This is an API workspace, having public visibility by default makes perfect sense.
  44. package(default_visibility = ["//visibility:public"])
  45. proto_library(
  46. name = "library_proto",
  47. srcs = [
  48. "library.proto",
  49. ],
  50. deps = [
  51. "//google/api:annotations_proto",
  52. "//google/api:client_proto",
  53. "//google/api:field_behavior_proto",
  54. "//google/api:resource_proto",
  55. "@com_google_protobuf//:empty_proto",
  56. "@com_google_protobuf//:field_mask_proto",
  57. ],
  58. )
  59. proto_library_with_info(
  60. name = "library_proto_with_info",
  61. deps = [
  62. ":library_proto",
  63. "//google/cloud:common_resources_proto",
  64. ],
  65. )
  66. java_proto_library(
  67. name = "library_java_proto",
  68. deps = [":library_proto"],
  69. )
  70. java_grpc_library(
  71. name = "library_java_grpc",
  72. srcs = [":library_proto"],
  73. deps = [":library_java_proto"],
  74. )
  75. java_gapic_library(
  76. name = "library_java_gapic",
  77. srcs = [":library_proto_with_info"],
  78. gapic_yaml = "library_example_gapic.yaml",
  79. grpc_service_config = "library_grpc_service_config.json",
  80. test_deps = [
  81. ":library_java_grpc",
  82. ],
  83. deps = [
  84. ":library_java_proto",
  85. ],
  86. )
  87. java_gapic_test(
  88. name = "library_java_gapic_test_suite",
  89. test_classes = [
  90. "com.google.cloud.example.library.v1.LibraryServiceClientTest",
  91. ],
  92. runtime_deps = [":library_java_gapic_test"],
  93. )
  94. # Open Source Packages
  95. java_gapic_assembly_gradle_pkg(
  96. name = "google-cloud-example-library-v1-java",
  97. deps = [
  98. ":library_java_gapic",
  99. ":library_java_grpc",
  100. ":library_java_proto",
  101. ":library_proto",
  102. ],
  103. )
  104. go_proto_library(
  105. name = "library_go_proto",
  106. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  107. importpath = "google.golang.org/genproto/googleapis/example/library/v1",
  108. protos = [":library_proto"],
  109. deps = [
  110. "//google/api:annotations_go_proto",
  111. ],
  112. )
  113. go_gapic_library(
  114. name = "library_go_gapic",
  115. srcs = [":library_proto_with_info"],
  116. grpc_service_config = "library_grpc_service_config.json",
  117. importpath = "google.golang.org/google/example/library/v1;library",
  118. metadata = True,
  119. service_yaml = "//google/example/library:library_example_v1.yaml",
  120. deps = [
  121. ":library_go_proto",
  122. ],
  123. )
  124. go_test(
  125. name = "library_go_gapic_test",
  126. srcs = [":library_go_gapic_srcjar_test"],
  127. embed = [":library_go_gapic"],
  128. importpath = "google.golang.org/google/example/library/v1",
  129. )
  130. # Open Source Packages
  131. go_gapic_assembly_pkg(
  132. name = "gapi-cloud-example-library-v1-go",
  133. deps = [
  134. ":library_go_gapic",
  135. ":library_go_gapic_srcjar-metadata.srcjar",
  136. ":library_go_gapic_srcjar-test.srcjar",
  137. ":library_go_proto",
  138. ],
  139. )
  140. py_gapic_library(
  141. name = "library_py_gapic",
  142. srcs = [":library_proto"],
  143. grpc_service_config = "library_grpc_service_config.json",
  144. )
  145. # Open Source Packages
  146. py_gapic_assembly_pkg(
  147. name = "example-library-v1-py",
  148. deps = [
  149. ":library_py_gapic",
  150. ],
  151. )
  152. php_proto_library(
  153. name = "library_php_proto",
  154. deps = [":library_proto"],
  155. )
  156. php_grpc_library(
  157. name = "library_php_grpc",
  158. srcs = [":library_proto"],
  159. deps = [":library_php_proto"],
  160. )
  161. php_gapic_library(
  162. name = "library_php_gapic",
  163. srcs = [":library_proto_with_info"],
  164. grpc_service_config = "library_grpc_service_config.json",
  165. service_yaml = "//google/example/library:library_example_v1.yaml",
  166. deps = [
  167. ":library_php_grpc",
  168. ":library_php_proto",
  169. ],
  170. )
  171. # Open Source Packages
  172. php_gapic_assembly_pkg(
  173. name = "google-cloud-example-library-v1-php",
  174. deps = [
  175. ":library_php_gapic",
  176. ":library_php_grpc",
  177. ":library_php_proto",
  178. ],
  179. )
  180. nodejs_gapic_library(
  181. name = "library_nodejs_gapic",
  182. package_name = "@google-cloud/library",
  183. src = ":library_proto_with_info",
  184. extra_protoc_parameters = ["metadata"],
  185. grpc_service_config = "library_grpc_service_config.json",
  186. package = "google.cloud.example.library.v1",
  187. service_yaml = "//google/example/library:library_example_v1.yaml",
  188. deps = [],
  189. )
  190. nodejs_gapic_assembly_pkg(
  191. name = "example-library-v1-nodejs",
  192. deps = [
  193. ":library_nodejs_gapic",
  194. ":library_proto",
  195. ],
  196. )
  197. ruby_proto_library(
  198. name = "library_ruby_proto",
  199. deps = [":library_proto"],
  200. )
  201. ruby_grpc_library(
  202. name = "library_ruby_grpc",
  203. srcs = [":library_proto"],
  204. deps = [":library_ruby_proto"],
  205. )
  206. # Uncomment the following once the space issue has been fixed.
  207. ruby_cloud_gapic_library(
  208. name = "library_ruby_gapic",
  209. srcs = [":library_proto_with_info"],
  210. extra_protoc_parameters = [
  211. "ruby-cloud-gem-name=google-cloud-example_library-v1",
  212. "ruby-cloud-env-prefix=LIBRARY",
  213. "ruby-cloud-product-url=https://cloud.google.com",
  214. "ruby-cloud-api-id=library-example.googleapis.com",
  215. "ruby-cloud-api-shortname=library",
  216. ],
  217. grpc_service_config = "library_grpc_service_config.json",
  218. ruby_cloud_description = "This is a Google example service representing a simple digital library. It manages a collection of shelf resources, and each shelf owns a collection of book resources.",
  219. ruby_cloud_title = "Example Library V1",
  220. deps = [
  221. ":library_ruby_grpc",
  222. ":library_ruby_proto",
  223. ],
  224. )
  225. # Open Source Packages
  226. ruby_gapic_assembly_pkg(
  227. name = "google-cloud-example-library-v1-ruby",
  228. deps = [
  229. ":library_ruby_gapic",
  230. ":library_ruby_grpc",
  231. ":library_ruby_proto",
  232. ],
  233. )
  234. csharp_proto_library(
  235. name = "library_csharp_proto",
  236. deps = [":library_proto"],
  237. )
  238. csharp_grpc_library(
  239. name = "library_csharp_grpc",
  240. srcs = [":library_proto"],
  241. deps = [":library_csharp_proto"],
  242. )
  243. csharp_gapic_library(
  244. name = "library_csharp_gapic",
  245. srcs = [":library_proto_with_info"],
  246. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  247. grpc_service_config = "library_grpc_service_config.json",
  248. deps = [
  249. ":library_csharp_grpc",
  250. ":library_csharp_proto",
  251. ],
  252. )
  253. # Open Source Packages
  254. csharp_gapic_assembly_pkg(
  255. name = "google-cloud-example-library-v1-csharp",
  256. deps = [
  257. ":library_csharp_gapic",
  258. ":library_csharp_grpc",
  259. ":library_csharp_proto",
  260. ],
  261. )
  262. ##############################################################################
  263. # C++
  264. ##############################################################################
  265. # Put your C++ rules here