Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrymarino committed Feb 7, 2022
1 parent d53706d commit e492188
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
8 changes: 0 additions & 8 deletions rules/library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -471,14 +471,6 @@ def apple_library(name, library_tools = {}, export_private_headers = True, names
swift_sources.append(f)
elif f.endswith((".cc", ".cpp")):
cpp_sources.append(f)
elif f.count("sample_objc_proto_srcs") > 0:
objc_sources.append(f)
elif f.count("sample_objc_proto_hdrs") > 0:
objc_hdrs.append(f)
elif f.count("second_objc_proto_srcs") > 0:
objc_sources.append(f)
elif f.count("second_objc_proto_hdrs") > 0:
objc_hdrs.append(f)
else:
fail("Unable to compile %s in apple_framework %s" % (f, name))

Expand Down
20 changes: 11 additions & 9 deletions tests/ios/frameworks/protos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//rules:framework.bzl", "apple_framework")

exports_files(["*.proto"])


proto_library(
name = "sample_proto",
srcs = ["sample.proto"],
Expand All @@ -17,22 +16,25 @@ objc_proto_compile(

# Filter files to sources and headers
filter_files(
name = "sample_objc_proto_srcs",
target = "sample_objc_proto",
name = "sample_objc_proto.m",
extensions = ["m"],
target = "sample_objc_proto",
)

filter_files(
name = "sample_objc_proto_hdrs",
target = "sample_objc_proto",
name = "sample_objc_proto.h",
extensions = ["h"],
target = "sample_objc_proto",
)

apple_framework(
name = "SampleProtoFramework",
srcs = [":sample_objc_proto_srcs", ":sample_objc_proto_hdrs"],
deps = ["@com_google_protobuf//:protobuf_objc"],
name = "SampleProtoFramework",
srcs = [
":sample_objc_proto.h",
":sample_objc_proto.m",
],
includes = ["sample_objc_proto"],
platforms = {"ios": "10.0"},
visibility = ["//visibility:public"],
includes = ["sample_objc_proto"],
deps = ["@com_google_protobuf//:protobuf_objc"],
)

0 comments on commit e492188

Please sign in to comment.