Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeWang1127 committed May 16, 2024
1 parent 7385de4 commit 534ae9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library_generation/utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from library_generation.utils.proto_path_utils import remove_version_from

script_dir = os.path.dirname(os.path.realpath(__file__))
SDK_PLATFORM_JAVA = "googleapis/sdk-platform-java"


def create_argument(arg_key: str, arg_container: object) -> List[str]:
Expand Down Expand Up @@ -213,7 +214,7 @@ def generate_prerequisite_files(
)
distribution_name_short = re.split(r"[:/]", distribution_name)[-1]
if config.contains_common_protos():
repo = "googleapis/sdk-platform-java"
repo = SDK_PLATFORM_JAVA
elif config.is_monorepo():
repo = "googleapis/google-cloud-java"
else:
Expand Down Expand Up @@ -252,7 +253,10 @@ def generate_prerequisite_files(
"library_type": library.library_type,
"requires_billing": library.requires_billing,
}
if config.contains_common_protos():

# this removal is for java-common-protos and java-iam in
# sdk-platform-java
if repo == SDK_PLATFORM_JAVA:
repo_metadata.pop("api_id")

if library.api_reference:
Expand Down

0 comments on commit 534ae9c

Please sign in to comment.