Debian Codegraph @

examples/objective-c/BUILD

raw
1 # Copyright 2019 gRPC authors.
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 # http://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_github_grpc_grpc//bazel:objc_grpc_library.bzl", "objc_grpc_library")
16 load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
17 load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application")
18
19 licenses(["notice"])
20
21 package(default_visibility = ["//visibility:public"])
22
23 objc_grpc_library(
24 name = "HelloWorld_grpc_proto",
25 srcs = ["//examples/protos:helloworld.proto"],
26 tags = ["manual"],
27 deps = ["//examples/protos:helloworld_proto"],
28 )
29
30 # This one works with import "external/com_github_grpc_grpc/examples/protos/Keyvaluestore.pbrpc.h"
31 objc_grpc_library(
32 name = "Keyvaluestore_grpc_proto_external",
33 srcs = ["//external/com_github_grpc_grpc/examples/protos:keyvaluestore.proto"],
34 tags = ["manual"],
35 deps = ["@com_github_grpc_grpc//examples/protos:keyvaluestore_proto"],
36 )
37
38 objc_library(
39 name = "HelloWorld-lib",
40 srcs = glob(["helloworld/**/*.m"]),
41 hdrs = glob(["helloworld/**/*.h"]),
42 data = glob([
43 "helloworld/HelloWorld/Base.lproj/**",
44 "helloworld/HelloWorld/Images.xcassets/**",
45 ]),
46 includes = ["helloworld/HelloWorld"],
47 tags = ["manual"],
48 deps = [":HelloWorld_grpc_proto"],
49 )
50
51 ios_application(
52 name = "HelloWorld",
53 bundle_id = "Google.HelloWorld",
54 families = [
55 "iphone",
56 "ipad",
57 ],
58 infoplists = ["helloworld/HelloWorld/Info.plist"],
59 minimum_os_version = "9.0",
60 tags = ["manual"],
61 deps = [":HelloWorld-lib"],
62 )
63
64 objc_library(
65 name = "HelloWorldMacos-lib",
66 srcs = glob(["helloworld_macos/**/*.m"]),
67 hdrs = glob(["helloworld_macos/**/*.h"]),
68 data = glob([
69 "helloworld_macos/HelloWorld/Base.lproj/**",
70 "helloworld_macos/HelloWorld/Images.xcassets/**",
71 ]),
72 includes = ["helloworld_macos/HelloWorld"],
73 tags = ["manual"],
74 deps = [":HelloWorld_grpc_proto"],
75 )
76
77 macos_application(
78 name = "HelloWorldMacos",
79 bundle_id = "io.grpc.HelloWorld",
80 entitlements = "helloworld_macos/HelloWorld/Helloworld.entitlements",
81 infoplists = ["helloworld_macos/HelloWorld/Info.plist"],
82 minimum_os_version = "10.13",
83 tags = ["manual"],
84 deps = [":HelloWorldMacos-lib"],
85 )
86
87 objc_grpc_library(
88 name = "RouteGuide",
89 srcs = ["//examples/protos:route_guide.proto"],
90 tags = ["manual"],
91 deps = ["//examples/protos:route_guide_proto"],
92 )
93
94 objc_library(
95 name = "RouteGuideClient-lib",
96 srcs = glob(["route_guide/**/*.m"]),
97 hdrs = glob(["route_guide/**/*.h"]),
98 data = glob([
99 "route_guide/Misc/Base.lproj/**",
100 "route_guide/Misc/Images.xcassets/**",
101 ]) + ["route_guide/route_guide_db.json"],
102 includes = ["route_guide/Misc"],
103 tags = ["manual"],
104 deps = [":RouteGuide"],
105 )
106
107 ios_application(
108 name = "RouteGuideClient",
109 bundle_id = "gRPC.RouteGuideClient",
110 families = [
111 "iphone",
112 "ipad",
113 ],
114 infoplists = ["route_guide/Misc/Info.plist"],
115 minimum_os_version = "9.0",
116 tags = ["manual"],
117 deps = [":RouteGuideClient-lib"],
118 )