|
26 | 26 | from library_generation.utils.proto_path_utils import remove_version_from |
27 | 27 |
|
28 | 28 | script_dir = os.path.dirname(os.path.realpath(__file__)) |
29 | | -SDK_PLATFORM_JAVA = "googleapis/google-cloud-java" |
| 29 | + |
| 30 | +LIBRARIES_WITHOUT_API_ID = { |
| 31 | + "google-auth-library", |
| 32 | + "showcase", |
| 33 | + "iam", |
| 34 | + "api-common", |
| 35 | + "common-protos", |
| 36 | + "gax", |
| 37 | + "core", |
| 38 | +} |
30 | 39 |
|
31 | 40 |
|
32 | 41 | def create_argument(arg_key: str, arg_container: object) -> List[str]: |
@@ -179,9 +188,7 @@ def get_library_repository( |
179 | 188 |
|
180 | 189 | :return: string representing the repository |
181 | 190 | """ |
182 | | - if config.contains_common_protos(): |
183 | | - repo = SDK_PLATFORM_JAVA |
184 | | - elif config.is_monorepo(): |
| 191 | + if config.is_monorepo() or config.contains_common_protos(): |
185 | 192 | repo = "googleapis/google-cloud-java" |
186 | 193 | else: |
187 | 194 | repo = f"googleapis/{language}-{library.get_library_name()}" |
@@ -242,15 +249,13 @@ def generate_postprocessing_prerequisite_files( |
242 | 249 | "repo": repo, |
243 | 250 | "repo_short": f"{language}-{library_name}", |
244 | 251 | "distribution_name": library.get_maven_coordinate(), |
245 | | - "api_id": api_id, |
246 | | - "library_type": library.library_type, |
247 | | - "requires_billing": library.requires_billing, |
248 | 252 | } |
249 | 253 |
|
250 | | - # this removal is for java-common-protos and java-iam in |
251 | | - # sdk-platform-java |
252 | | - if repo == SDK_PLATFORM_JAVA: |
253 | | - repo_metadata.pop("api_id") |
| 254 | + if library.get_library_name() not in LIBRARIES_WITHOUT_API_ID and library.library_type != "OTHER": |
| 255 | + repo_metadata["api_id"] = api_id |
| 256 | + |
| 257 | + repo_metadata["library_type"] = library.library_type |
| 258 | + repo_metadata["requires_billing"] = library.requires_billing |
254 | 259 |
|
255 | 260 | if library.api_reference: |
256 | 261 | repo_metadata["api_reference"] = library.api_reference |
|
0 commit comments