Skip to content

Commit 63cc541

Browse files
authored
feat: add libraries_bom_version in metadata (#1956)
* feat: add libraries_bom_version * add unit tests * remove isfile * add tempdir * restore * add current dir * restore template * remove unit test * restore templates
1 parent 3095543 commit 63cc541

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

synthtool/languages/java.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
\\*/
6363
"""
6464
DEFAULT_MIN_SUPPORTED_JAVA_VERSION = 8
65+
METADATA = "metadata"
66+
LIBRARIES_BOM_VERSION = "libraries_bom_version"
6567

6668

6769
def format_code(
@@ -490,7 +492,7 @@ def common_templates(
490492
:param kwargs: Additional options for CommonTemplates.java_library()
491493
"""
492494
metadata = _common_template_metadata()
493-
kwargs["metadata"] = metadata
495+
kwargs[METADATA] = metadata
494496

495497
# Generate flat to tell this repository is a split repo that have migrated
496498
# to monorepo. The owlbot.py in the monorepo sets monorepo=True.
@@ -499,6 +501,8 @@ def common_templates(
499501
split_repo = not monorepo
500502
repo_metadata = metadata["repo"]
501503
repo_short = repo_metadata["repo_short"]
504+
if LIBRARIES_BOM_VERSION in kwargs:
505+
kwargs[METADATA][LIBRARIES_BOM_VERSION] = kwargs.get(LIBRARIES_BOM_VERSION)
502506
# Special libraries that are not GAPIC_AUTO but in the monorepo
503507
special_libs_in_monorepo = [
504508
"java-translate",

0 commit comments

Comments
 (0)