Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 7ced24a

Browse files
authored
feat: add bazel support for gapic metadata (#811)
1 parent 2e7ea11 commit 7ced24a

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

rules_python_gapic/py_gapic.bzl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@ def py_gapic_library(
1818
name,
1919
srcs,
2020
grpc_service_config = None,
21-
plugin_args = [],
22-
opt_args = [],
21+
plugin_args = None,
22+
opt_args = None,
23+
metadata = False,
2324
**kwargs):
2425
# srcjar_target_name = "%s_srcjar" % name
2526
srcjar_target_name = name
2627
srcjar_output_suffix = ".srcjar"
2728

29+
plugin_args = plugin_args or []
30+
opt_args = opt_args or []
31+
32+
if metadata:
33+
plugin_args.append("metadata")
34+
2835
file_args = {}
2936
if grpc_service_config:
3037
file_args[grpc_service_config] = "retry-config"

0 commit comments

Comments
 (0)