Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions rules_java_gapic/java_gapic.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_custom_library", "unzipped_srcjar")

SERVICE_YAML_ALLOWLIST = ["googleads"]

def _java_gapic_postprocess_srcjar_impl(ctx):
gapic_srcjar = ctx.file.gapic_srcjar
output_srcjar_name = ctx.label.name
Expand Down Expand Up @@ -91,9 +93,17 @@ def java_gapic_library(
if grpc_service_config:
file_args_dict[grpc_service_config] = "grpc-service-config"

# Currently a no-op.
# Check the allow-list.
if service_yaml:
file_args_dict[service_yaml] = "gapic-service-config"
service_yaml_in_allowlist = False
for keyword in SERVICE_YAML_ALLOWLIST:
if keyword in service_yaml:
service_yaml_in_allowlist = True
break
if service_yaml_in_allowlist:
file_args_dict[service_yaml] = "gapic-service-config"
else:
fail("Service.yaml is no longer supported in the Java microgenerator")

srcjar_name = name + "_srcjar"
raw_srcjar_name = srcjar_name + "_raw"
Expand Down
3 changes: 0 additions & 3 deletions test/integration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ java_gapic_library(
srcs = ["@com_google_googleapis//google/cloud/asset/v1:asset_proto_with_info"],
grpc_service_config = "@com_google_googleapis//google/cloud/asset/v1:cloudasset_grpc_service_config.json",
package = "google.cloud.asset.v1",
service_yaml = "@com_google_googleapis//google/cloud/asset/v1:cloudasset_v1.yaml",
test_deps = [
"@com_google_googleapis//google/cloud/asset/v1:asset_java_grpc",
"@com_google_googleapis//google/iam/v1:iam_java_grpc",
Expand Down Expand Up @@ -88,7 +87,6 @@ java_gapic_library(
srcs = ["redis_proto_with_info"],
grpc_service_config = "@com_google_googleapis//google/cloud/redis/v1:redis_grpc_service_config.json",
package = "google.cloud.redis.v1",
service_yaml = "@com_google_googleapis//google/cloud/redis/v1:redis_v1.yaml",
test_deps = [
"@com_google_googleapis//google/cloud/redis/v1:redis_java_grpc",
],
Expand All @@ -113,7 +111,6 @@ java_gapic_library(
srcs = ["@com_google_googleapis//google/logging/v2:logging_proto_with_info"],
grpc_service_config = "@com_google_googleapis//google/logging/v2:logging_grpc_service_config.json",
package = "google.logging.v2",
service_yaml = "@com_google_googleapis//google/logging/v2:logging.yaml",
test_deps = [
"@com_google_googleapis//google/logging/v2:logging_java_grpc",
],
Expand Down
4 changes: 1 addition & 3 deletions test/integration/goldens/asset/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

/**
* A client to Cloud Asset API
*
* <p>The interfaces provided are listed below, along with usage samples.
* The interfaces provided are listed below, along with usage samples.
*
* <p>======================= AssetServiceClient =======================
*
Expand Down
4 changes: 1 addition & 3 deletions test/integration/goldens/logging/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

/**
* A client to Cloud Logging API
*
* <p>The interfaces provided are listed below, along with usage samples.
* The interfaces provided are listed below, along with usage samples.
*
* <p>======================= LoggingServiceV2Client =======================
*
Expand Down
4 changes: 1 addition & 3 deletions test/integration/goldens/redis/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

/**
* A client to Google Cloud Memorystore for Redis API
*
* <p>The interfaces provided are listed below, along with usage samples.
* The interfaces provided are listed below, along with usage samples.
*
* <p>======================= CloudRedisClient =======================
*
Expand Down