1 # gRPC Bazel BUILD file.
3 # Copyright 2019 gRPC authors.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 load("//bazel:grpc_build_system.bzl", "grpc_generate_objc_one_off_targets", "grpc_objc_library")
18 load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle")
22 package(default_visibility = ["//visibility:public"])
24 exports_files(["LICENSE"])
26 grpc_generate_objc_one_off_targets()
29 name = "rx_library_headers",
43 ":rx_library_headers",
44 ":rx_library_private",
49 name = "rx_library_private",
51 "RxLibrary/private/*.m",
54 "RxLibrary/private/*.h",
56 visibility = ["//visibility:private"],
60 name = "grpc_objc_interface_legacy",
62 "GRPCClient/GRPCCall+ChannelArg.h",
63 "GRPCClient/GRPCCall+ChannelCredentials.h",
64 "GRPCClient/GRPCCall+Cronet.h",
65 "GRPCClient/GRPCCall+OAuth2.h",
66 "GRPCClient/GRPCCall+Tests.h",
67 "GRPCClient/GRPCCallLegacy.h",
70 ":grpc_objc_interface_types",
71 ":rx_library_headers",
76 name = "grpc_objc_interface_types",
78 "GRPCClient/GRPCTypes.m",
81 "GRPCClient/GRPCTypes.h",
86 name = "grpc_objc_interface",
88 "GRPCClient/GRPCCall.m",
89 "GRPCClient/GRPCCall+Interceptor.m",
90 "GRPCClient/GRPCCallOptions.m",
91 "GRPCClient/GRPCInterceptor.m",
92 "GRPCClient/GRPCTransport.m",
93 "GRPCClient/private/GRPCTransport+Private.m",
96 "GRPCClient/GRPCCall.h",
97 "GRPCClient/GRPCCall+Interceptor.h",
98 "GRPCClient/GRPCCallOptions.h",
99 "GRPCClient/GRPCDispatchable.h",
100 "GRPCClient/GRPCInterceptor.h",
101 "GRPCClient/GRPCTransport.h",
102 "GRPCClient/internal/GRPCCallOptions+Internal.h",
103 "GRPCClient/version.h",
107 "GRPCClient/private/GRPCTransport+Private.h",
110 ":grpc_objc_interface_legacy",
115 name = "grpc_objc_client",
117 "GRPCClient/GRPCCall+ChannelArg.m",
118 "GRPCClient/GRPCCall+ChannelCredentials.m",
119 "GRPCClient/GRPCCall+Cronet.m",
120 "GRPCClient/GRPCCall+OAuth2.m",
121 "GRPCClient/GRPCCall+Tests.m",
122 "GRPCClient/GRPCCallLegacy.m",
123 ] + glob(["GRPCClient/private/GRPCCore/*.m"]),
125 "GRPCClient/GRPCCall+ChannelArg.h",
126 "GRPCClient/GRPCCall+ChannelCredentials.h",
127 "GRPCClient/GRPCCall+Cronet.h",
128 "GRPCClient/GRPCCall+OAuth2.h",
129 "GRPCClient/GRPCCall+Tests.h",
131 data = [":gRPCCertificates"],
133 textual_hdrs = glob(["GRPCClient/private/GRPCCore/*.h"]),
135 ":grpc_objc_interface",
136 ":grpc_objc_interface_legacy",
142 # TODO (mxyan): Switch "name" and "actual" when import is done
143 # Some internal Swift projects will need to be updated with the new name
145 name = "grpc_objc_client_core",
146 actual = "grpc_objc_client",
150 name = "proto_objc_rpc_legacy_header",
152 "ProtoRPC/ProtoRPCLegacy.h",
158 name = "proto_objc_rpc_v2",
160 "ProtoRPC/ProtoMethod.m",
161 "ProtoRPC/ProtoRPC.m",
162 "ProtoRPC/ProtoService.m",
165 "ProtoRPC/ProtoMethod.h",
166 "ProtoRPC/ProtoRPC.h",
167 "ProtoRPC/ProtoService.h",
169 defines = ["GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=0"],
172 ":grpc_objc_interface",
173 ":proto_objc_rpc_legacy_header",
174 "@com_google_protobuf//:protobuf_objc",
179 name = "proto_objc_rpc",
181 "ProtoRPC/ProtoRPCLegacy.m",
182 "ProtoRPC/ProtoServiceLegacy.m",
185 "ProtoRPC/ProtoMethod.h",
186 "ProtoRPC/ProtoRPC.h",
187 "ProtoRPC/ProtoRPCLegacy.h",
188 "ProtoRPC/ProtoService.h",
191 ":grpc_objc_client_core",
192 ":proto_objc_rpc_legacy_header",
193 ":proto_objc_rpc_v2",
195 "@com_google_protobuf//:protobuf_objc",
199 apple_resource_bundle(
200 # The choice of name is signicant here, since it determines the bundle name.
201 name = "gRPCCertificates",
202 resources = ["//:etc/roots.pem"],
205 # Internal target combining grpc_objc_client_core and proto_objc_rpc for testing
207 name = "grpc_objc_client_core_internal_testing",
209 "GRPCClient/GRPCCall+ChannelArg.m",
210 "GRPCClient/GRPCCall+ChannelCredentials.m",
211 "GRPCClient/GRPCCall+Cronet.m",
212 "GRPCClient/GRPCCall+OAuth2.m",
213 "GRPCClient/GRPCCall+Tests.m",
214 "GRPCClient/GRPCCallLegacy.m",
215 "GRPCClient/internal_testing/GRPCCall+InternalTests.m",
216 ] + glob(["GRPCClient/private/GRPCCore/*.m"]),
218 "GRPCClient/GRPCCall+ChannelArg.h",
219 "GRPCClient/GRPCCall+ChannelCredentials.h",
220 "GRPCClient/GRPCCall+Cronet.h",
221 "GRPCClient/GRPCCall+OAuth2.h",
222 "GRPCClient/GRPCCall+Tests.h",
223 "GRPCClient/internal_testing/GRPCCall+InternalTests.h",
225 data = [":gRPCCertificates"],
230 textual_hdrs = glob(["GRPCClient/private/GRPCCore/*.h"]),
232 ":grpc_objc_interface",
233 ":grpc_objc_interface_legacy",
240 name = "proto_objc_rpc_internal_testing",
242 "ProtoRPC/ProtoRPCLegacy.m",
243 "ProtoRPC/ProtoServiceLegacy.m",
246 "ProtoRPC/ProtoMethod.h",
247 "ProtoRPC/ProtoRPC.h",
248 "ProtoRPC/ProtoRPCLegacy.h",
249 "ProtoRPC/ProtoService.h",
252 ":grpc_objc_client_core_internal_testing",
253 ":proto_objc_rpc_legacy_header",
254 ":proto_objc_rpc_v2",
256 "@com_google_protobuf//:protobuf_objc",
261 name = "grpc_objc_client_internal_testing",
262 actual = "proto_objc_rpc_internal_testing",