99# * extra_protoc_file_parameters
1010# The complete list of preserved parameters can be found in the source code.
1111
12+ # This is an API workspace, having public visibility by default makes perfect sense.
13+ package (default_visibility = ["//visibility:public" ])
14+
1215##############################################################################
1316# Common
1417##############################################################################
1518load ("@rules_proto//proto:defs.bzl" , "proto_library" )
16- load (
17- "@com_google_googleapis_imports//:imports.bzl" ,
18- "cc_grpc_library" ,
19- "cc_proto_library" ,
20- "java_gapic_assembly_gradle_pkg" ,
21- "java_gapic_library" ,
22- "java_gapic_test" ,
23- "java_grpc_library" ,
24- "java_proto_library" ,
25- "nodejs_gapic_assembly_pkg" ,
26- "nodejs_gapic_library" ,
27- "php_gapic_assembly_pkg" ,
28- "php_gapic_library" ,
29- "php_grpc_library" ,
30- "php_proto_library" ,
31- "proto_library_with_info" ,
32- "py_gapic_assembly_pkg" ,
33- "py_gapic_library" ,
34- "ruby_cloud_gapic_library" ,
35- "ruby_gapic_assembly_pkg" ,
36- "ruby_grpc_library" ,
37- "ruby_proto_library" ,
38- )
39-
40- # This is an API workspace, having public visibility by default makes perfect sense.
41- package (default_visibility = ["//visibility:public" ])
19+ load ("@com_google_googleapis_imports//:imports.bzl" , "proto_library_with_info" )
4220
4321proto_library (
4422 name = "testing_proto" ,
@@ -65,6 +43,18 @@ proto_library_with_info(
6543 ],
6644)
6745
46+ ##############################################################################
47+ # Java
48+ ##############################################################################
49+ load (
50+ "@com_google_googleapis_imports//:imports.bzl" ,
51+ "java_gapic_assembly_gradle_pkg" ,
52+ "java_gapic_library" ,
53+ "java_gapic_test" ,
54+ "java_grpc_library" ,
55+ "java_proto_library" ,
56+ )
57+
6858java_proto_library (
6959 name = "testing_java_proto" ,
7060 deps = [":testing_proto" ],
@@ -79,6 +69,7 @@ java_grpc_library(
7969java_gapic_library (
8070 name = "testing_java_gapic" ,
8171 srcs = [":testing_proto_with_info" ],
72+ gapic_yaml = None ,
8273 grpc_service_config = "testing_grpc_service_config.json" ,
8374 rest_numeric_enums = True ,
8475 service_yaml = "testing_v1.yaml" ,
@@ -88,6 +79,7 @@ java_gapic_library(
8879 transport = "grpc+rest" ,
8980 deps = [
9081 ":testing_java_proto" ,
82+ "//google/api:api_java_proto" ,
9183 ],
9284)
9385
@@ -120,60 +112,68 @@ java_gapic_assembly_gradle_pkg(
120112##############################################################################
121113# Go
122114##############################################################################
123- #
124- # Commented out because of a build failure:
125- # bazel-out/k8-fastbuild/bin/google/devtools/testing/v1/testing_go_gapic_srcjar_main.go/cloud.google.com/go/devtools/testing/apiv1/test_environment_discovery_client.go:23:2: imported and not used: "net/url"
126- # compilepkg: error running subcommand external/go_sdk/pkg/tool/linux_amd64/compile: exit status 2
127- #
128- # load(
129- # "@com_google_googleapis_imports//:imports.bzl",
130- # "go_gapic_assembly_pkg",
131- # "go_gapic_library",
132- # "go_proto_library",
133- # "go_test",
134- # )
135-
136- # go_proto_library(
137- # name = "testing_go_proto",
138- # compilers = ["@io_bazel_rules_go//proto:go_grpc"],
139- # importpath = "google.golang.org/genproto/googleapis/devtools/testing/v1",
140- # protos = [":testing_proto"],
141- # deps = [
142- # "//google/api:annotations_go_proto",
143- # "//google/type:date_go_proto",
144- # ],
145- # )
146-
147- # go_gapic_library(
148- # name = "testing_go_gapic",
149- # srcs = [":testing_proto_with_info"],
150- # grpc_service_config = "testing_grpc_service_config.json",
151- # importpath = "cloud.google.com/go/devtools/testing/apiv1;testing",
152- # service_yaml = "testing_v1.yaml",
153- # metadata = True,
154- # deps = [
155- # ":testing_go_proto",
156- # "@io_bazel_rules_go//proto/wkt:duration_go_proto",
157- # ],
158- # )
159-
160- # go_test(
161- # name = "testing_go_gapic_test",
162- # srcs = [":testing_go_gapic_srcjar_test"],
163- # embed = [":testing_go_gapic"],
164- # importpath = "cloud.google.com/go/devtools/testing/apiv1",
165- # )
166-
167- # # Open Source Packages
168- # go_gapic_assembly_pkg(
169- # name = "gapi-cloud-devtools-testing-v1-go",
170- # deps = [
171- # ":testing_go_gapic",
172- # ":testing_go_gapic_srcjar-test.srcjar",
173- # ":testing_go_gapic_srcjar-metadata.srcjar",
174- # ":testing_go_proto",
175- # ],
176- # )
115+ load (
116+ "@com_google_googleapis_imports//:imports.bzl" ,
117+ "go_gapic_assembly_pkg" ,
118+ "go_gapic_library" ,
119+ "go_proto_library" ,
120+ "go_test" ,
121+ )
122+
123+ go_proto_library (
124+ name = "testing_go_proto" ,
125+ compilers = ["@io_bazel_rules_go//proto:go_grpc" ],
126+ importpath = "google.golang.org/genproto/googleapis/devtools/testing/v1" ,
127+ protos = [":testing_proto" ],
128+ deps = [
129+ "//google/api:annotations_go_proto" ,
130+ "//google/type:date_go_proto" ,
131+ ],
132+ )
133+
134+ go_gapic_library (
135+ name = "testing_go_gapic" ,
136+ srcs = [":testing_proto_with_info" ],
137+ grpc_service_config = "testing_grpc_service_config.json" ,
138+ importpath = "cloud.google.com/go/devtools/testing/apiv1;testing" ,
139+ metadata = True ,
140+ release_level = "beta" ,
141+ rest_numeric_enums = True ,
142+ service_yaml = "testing_v1.yaml" ,
143+ transport = "grpc+rest" ,
144+ deps = [
145+ ":testing_go_proto" ,
146+ "@io_bazel_rules_go//proto/wkt:duration_go_proto" ,
147+ ],
148+ )
149+
150+ go_test (
151+ name = "testing_go_gapic_test" ,
152+ srcs = [":testing_go_gapic_srcjar_test" ],
153+ embed = [":testing_go_gapic" ],
154+ importpath = "cloud.google.com/go/devtools/testing/apiv1" ,
155+ )
156+
157+ # Open Source Packages
158+ go_gapic_assembly_pkg (
159+ name = "gapi-cloud-devtools-testing-v1-go" ,
160+ deps = [
161+ ":testing_go_gapic" ,
162+ ":testing_go_gapic_srcjar-metadata.srcjar" ,
163+ ":testing_go_gapic_srcjar-test.srcjar" ,
164+ ":testing_go_proto" ,
165+ ],
166+ )
167+
168+ ##############################################################################
169+ # Python
170+ ##############################################################################
171+ load (
172+ "@com_google_googleapis_imports//:imports.bzl" ,
173+ "py_gapic_assembly_pkg" ,
174+ "py_gapic_library" ,
175+ "py_test" ,
176+ )
177177
178178py_gapic_library (
179179 name = "testing_py_gapic" ,
@@ -182,19 +182,10 @@ py_gapic_library(
182182 rest_numeric_enums = True ,
183183 service_yaml = "testing_v1.yaml" ,
184184 transport = "grpc+rest" ,
185+ deps = [
186+ ],
185187)
186188
187- # Uncomment once https://github.com/googleapis/gapic-generator-python/issues/1376 is fixed
188- #py_test(
189- # name = "testing_py_gapic_test",
190- # srcs = [
191- # "testing_py_gapic_pytest.py",
192- # "testing_py_gapic_test.py",
193- # ],
194- # legacy_create_init = False,
195- # deps = [":testing_py_gapic"],
196- #)
197-
198189# Open Source Packages
199190py_gapic_assembly_pkg (
200191 name = "devtools-testing-v1-py" ,
@@ -203,6 +194,17 @@ py_gapic_assembly_pkg(
203194 ],
204195)
205196
197+ ##############################################################################
198+ # PHP
199+ ##############################################################################
200+ load (
201+ "@com_google_googleapis_imports//:imports.bzl" ,
202+ "php_gapic_assembly_pkg" ,
203+ "php_gapic_library" ,
204+ "php_grpc_library" ,
205+ "php_proto_library" ,
206+ )
207+
206208php_proto_library (
207209 name = "testing_php_proto" ,
208210 deps = [":testing_proto" ],
@@ -237,6 +239,15 @@ php_gapic_assembly_pkg(
237239 ],
238240)
239241
242+ ##############################################################################
243+ # Node.js
244+ ##############################################################################
245+ load (
246+ "@com_google_googleapis_imports//:imports.bzl" ,
247+ "nodejs_gapic_assembly_pkg" ,
248+ "nodejs_gapic_library" ,
249+ )
250+
240251nodejs_gapic_library (
241252 name = "testing_nodejs_gapic" ,
242253 package_name = "@google-cloud/testing" ,
@@ -258,6 +269,17 @@ nodejs_gapic_assembly_pkg(
258269 ],
259270)
260271
272+ ##############################################################################
273+ # Ruby
274+ ##############################################################################
275+ load (
276+ "@com_google_googleapis_imports//:imports.bzl" ,
277+ "ruby_cloud_gapic_library" ,
278+ "ruby_gapic_assembly_pkg" ,
279+ "ruby_grpc_library" ,
280+ "ruby_proto_library" ,
281+ )
282+
261283ruby_proto_library (
262284 name = "testing_ruby_proto" ,
263285 deps = [":testing_proto" ],
@@ -272,9 +294,7 @@ ruby_grpc_library(
272294ruby_cloud_gapic_library (
273295 name = "testing_ruby_gapic" ,
274296 srcs = [":testing_proto_with_info" ],
275- extra_protoc_parameters = [
276- "ruby-cloud-gem-name=google-cloud-devtools-testing-v1" ,
277- ],
297+ extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-devtools-testing-v1" ],
278298 grpc_service_config = "testing_grpc_service_config.json" ,
279299 rest_numeric_enums = True ,
280300 service_yaml = "testing_v1.yaml" ,
@@ -297,50 +317,56 @@ ruby_gapic_assembly_pkg(
297317##############################################################################
298318# C#
299319##############################################################################
300- #
301- # Commented out until enum path segments are supported.
302- # --gapic_out: System.InvalidOperationException: Path in http url must resolve to a string field: 'environment_type'.
303- #
304- # load(
305- # "@com_google_googleapis_imports//:imports.bzl",
306- # "csharp_gapic_assembly_pkg",
307- # "csharp_gapic_library",
308- # "csharp_grpc_library",
309- # "csharp_proto_library",
310- # )
311-
312- # csharp_proto_library(
313- # name = "testing_csharp_proto",
314- # deps = [":testing_proto"],
315- # )
316-
317- # csharp_grpc_library(
318- # name = "testing_csharp_grpc",
319- # srcs = [":testing_proto"],
320- # deps = [":testing_csharp_proto"],
321- # )
322-
323- # csharp_gapic_library(
324- # name = "testing_csharp_gapic",
325- # srcs = [":testing_proto_with_info"],
326- # common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
327- # grpc_service_config = "testing_grpc_service_config.json",
328- # service_yaml = "testing_v1.yaml",
329- # deps = [
330- # ":testing_csharp_grpc",
331- # ":testing_csharp_proto",
332- # ],
333- # )
334-
335- # # Open Source Packages
336- # csharp_gapic_assembly_pkg(
337- # name = "google-cloud-devtools-testing-v1-csharp",
338- # deps = [
339- # ":testing_csharp_gapic",
340- # ":testing_csharp_grpc",
341- # ":testing_csharp_proto",
342- # ],
343- # )
320+ load (
321+ "@com_google_googleapis_imports//:imports.bzl" ,
322+ "csharp_gapic_assembly_pkg" ,
323+ "csharp_gapic_library" ,
324+ "csharp_grpc_library" ,
325+ "csharp_proto_library" ,
326+ )
327+
328+ csharp_proto_library (
329+ name = "testing_csharp_proto" ,
330+ deps = [":testing_proto" ],
331+ )
332+
333+ csharp_grpc_library (
334+ name = "testing_csharp_grpc" ,
335+ srcs = [":testing_proto" ],
336+ deps = [":testing_csharp_proto" ],
337+ )
338+
339+ csharp_gapic_library (
340+ name = "testing_csharp_gapic" ,
341+ srcs = [":testing_proto_with_info" ],
342+ common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json" ,
343+ grpc_service_config = "testing_grpc_service_config.json" ,
344+ rest_numeric_enums = True ,
345+ service_yaml = "testing_v1.yaml" ,
346+ deps = [
347+ ":testing_csharp_grpc" ,
348+ ":testing_csharp_proto" ,
349+ ],
350+ )
351+
352+ # Open Source Packages
353+ csharp_gapic_assembly_pkg (
354+ name = "google-cloud-devtools-testing-v1-csharp" ,
355+ deps = [
356+ ":testing_csharp_gapic" ,
357+ ":testing_csharp_grpc" ,
358+ ":testing_csharp_proto" ,
359+ ],
360+ )
361+
362+ ##############################################################################
363+ # C++
364+ ##############################################################################
365+ load (
366+ "@com_google_googleapis_imports//:imports.bzl" ,
367+ "cc_grpc_library" ,
368+ "cc_proto_library" ,
369+ )
344370
345371cc_proto_library (
346372 name = "testing_cc_proto" ,
0 commit comments