|
| 1 | +# Copyright 2026 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") |
| 16 | +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") |
| 17 | +load("@grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library") |
| 18 | + |
| 19 | +package(default_visibility = ["//visibility:private"]) |
| 20 | + |
| 21 | +licenses(["notice"]) |
| 22 | + |
| 23 | +proto_library( |
| 24 | + name = "showcase_echo_proto", |
| 25 | + srcs = ["googleapis/gapic-showcase/schema/google/showcase/v1beta1/echo.proto"], |
| 26 | + strip_import_prefix = "googleapis/gapic-showcase/schema", |
| 27 | + deps = [ |
| 28 | + "@com_google_protobuf//:any_proto", |
| 29 | + "@com_google_protobuf//:duration_proto", |
| 30 | + "@com_google_protobuf//:timestamp_proto", |
| 31 | + "@googleapis//google/api:annotations_proto", |
| 32 | + "@googleapis//google/api:client_proto", |
| 33 | + "@googleapis//google/api:field_behavior_proto", |
| 34 | + "@googleapis//google/api:field_info_proto", |
| 35 | + "@googleapis//google/api:routing_proto", |
| 36 | + "@googleapis//google/longrunning:operations_proto", |
| 37 | + "@googleapis//google/rpc:status_proto", |
| 38 | + ], |
| 39 | +) |
| 40 | + |
| 41 | +cc_proto_library( |
| 42 | + name = "showcase_echo_cc_proto", |
| 43 | + deps = [":showcase_echo_proto"], |
| 44 | +) |
| 45 | + |
| 46 | +cc_grpc_library( |
| 47 | + name = "showcase_echo_cc_grpc", |
| 48 | + srcs = [":showcase_echo_proto"], |
| 49 | + grpc_only = True, |
| 50 | + deps = [":showcase_echo_cc_proto"], |
| 51 | +) |
| 52 | + |
| 53 | +filegroup( |
| 54 | + name = "echo_srcs", |
| 55 | + srcs = glob([ |
| 56 | + "google/showcase/v1beta1/internal/*_sources.cc", |
| 57 | + ]), |
| 58 | +) |
| 59 | + |
| 60 | +filegroup( |
| 61 | + name = "echo_hdrs", |
| 62 | + srcs = glob( |
| 63 | + include = [ |
| 64 | + "google/showcase/v1beta1/*.cc", |
| 65 | + "google/showcase/v1beta1/*.h", |
| 66 | + "google/showcase/v1beta1/internal/*.cc", |
| 67 | + "google/showcase/v1beta1/internal/*.h", |
| 68 | + ], |
| 69 | + exclude = [ |
| 70 | + "google/showcase/v1beta1/internal/*_sources.cc", |
| 71 | + ], |
| 72 | + ), |
| 73 | +) |
| 74 | + |
| 75 | +cc_library( |
| 76 | + name = "showcase_echo_client", |
| 77 | + srcs = [":echo_srcs"], |
| 78 | + hdrs = [":echo_hdrs"], |
| 79 | + copts = [ |
| 80 | + "-Ici/showcase", |
| 81 | + "-I$(BINDIR)/ci/showcase", |
| 82 | + ], |
| 83 | + includes = ["."], |
| 84 | + strip_include_prefix = "", |
| 85 | + deps = [ |
| 86 | + ":showcase_echo_cc_grpc", |
| 87 | + ":showcase_echo_cc_proto", |
| 88 | + "//:common", |
| 89 | + "//:grpc_utils", |
| 90 | + "//google/cloud:google_cloud_cpp_rest_internal", |
| 91 | + "//google/cloud:google_cloud_cpp_rest_protobuf_internal", |
| 92 | + "@abseil-cpp//absl/strings", |
| 93 | + "@googleapis//google/longrunning:longrunning_cc_grpc", |
| 94 | + ], |
| 95 | +) |
| 96 | + |
| 97 | +cc_test( |
| 98 | + name = "rest_pqc_test", |
| 99 | + srcs = ["rest_pqc_test.cc"], |
| 100 | + copts = [ |
| 101 | + "-Ici/showcase", |
| 102 | + "-I$(BINDIR)/ci/showcase", |
| 103 | + ], |
| 104 | + tags = ["integration-test"], |
| 105 | + deps = [ |
| 106 | + ":showcase_echo_client", |
| 107 | + "//:common", |
| 108 | + "//google/cloud:google_cloud_cpp_rest_internal", |
| 109 | + "//google/cloud/testing_util:google_cloud_cpp_testing_private", |
| 110 | + "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", |
| 111 | + "@googletest//:gtest_main", |
| 112 | + ], |
| 113 | +) |
0 commit comments