Added experimental wrappers for importing to Google3

pull/19855/head
Tony Lu 6 years ago
parent de6d4978e0
commit cb6a8ae0d2
  1. 11
      src/objective-c/examples/BUILD
  2. 19
      src/objective-c/grpc_objc_internal_library.bzl
  3. 8
      src/objective-c/tests/BUILD

@ -15,20 +15,25 @@
# limitations under the License.
load("//src/objective-c:grpc_objc_internal_library.bzl", "local_objc_grpc_library")
load(
"//src/objective-c:grpc_objc_internal_library.bzl",
"local_objc_grpc_library",
"proto_library_objc_wrapper",
)
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_apple//apple:tvos.bzl", "tvos_application")
load("@build_bazel_rules_apple//apple:watchos.bzl", "watchos_application", "watchos_extension")
proto_library(
proto_library_objc_wrapper(
name = "messages_proto",
srcs = ["RemoteTestClient/messages.proto"],
)
proto_library(
proto_library_objc_wrapper(
name = "test_proto",
srcs = ["RemoteTestClient/test.proto"],
deps = [":messages_proto"],
use_well_known_protos = True,
)
# use objc_grpc_library in bazel:objc_grpc_library.bzl when developing outside the repo

@ -30,7 +30,20 @@ load(
"generate_objc_srcs",
"generate_objc_non_arc_srcs"
)
load("//bazel:protobuf.bzl", "well_known_proto_libs")
def proto_library_objc_wrapper(
name,
srcs,
deps = [],
use_well_known_protos = False):
"""proto_library for adding dependencies to google/protobuf protos
use_well_known_protos - ignored in open source version
"""
native.proto_library(
name = name,
srcs = srcs,
deps = deps,
)
def grpc_objc_testing_library(
name,
@ -53,7 +66,7 @@ def grpc_objc_testing_library(
includes: added to search path, always [the path to objc directory]
deps: dependencies
"""
additional_deps = [
":RemoteTest",
"//src/objective-c:grpc_objc_client_internal_testing",
@ -61,7 +74,7 @@ def grpc_objc_testing_library(
if not name == "TestConfigs":
additional_deps += [":TestConfigs"]
native.objc_library(
name = name,
hdrs = hdrs,

@ -21,7 +21,8 @@ package(default_visibility = ["//visibility:private"])
load(
"//src/objective-c:grpc_objc_internal_library.bzl",
"grpc_objc_testing_library",
"local_objc_grpc_library"
"local_objc_grpc_library",
"proto_library_objc_wrapper",
)
load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application", "ios_unit_test")
@ -30,15 +31,16 @@ load("@build_bazel_rules_apple//apple:tvos.bzl", "tvos_application", "tvos_unit_
exports_files(["LICENSE"])
proto_library(
proto_library_objc_wrapper(
name = "messages_proto",
srcs = ["RemoteTestClient/messages.proto"],
)
proto_library(
proto_library_objc_wrapper(
name = "test_proto",
srcs = ["RemoteTestClient/test.proto"],
deps = [":messages_proto"],
use_well_known_protos = True,
)
local_objc_grpc_library(

Loading…
Cancel
Save