forked from grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
172 lines (154 loc) · 5.11 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# gRPC Bazel BUILD file.
#
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load(
"//src/objective-c:grpc_objc_internal_library.bzl",
"grpc_objc_examples_library",
"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")
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
proto_library_objc_wrapper(
name = "messages_proto",
srcs = ["RemoteTestClient/messages.proto"],
)
proto_library_objc_wrapper(
name = "test_proto",
srcs = ["RemoteTestClient/test.proto"],
use_well_known_protos = True,
deps = [":messages_proto"],
)
# use objc_grpc_library in bazel:objc_grpc_library.bzl when developing outside the repo
local_objc_grpc_library(
name = "RemoteTest",
srcs = ["RemoteTestClient/test.proto"],
use_well_known_protos = True,
deps = [
"//src/objective-c/examples:test_proto",
],
)
# Proof that without this works without srcs
local_objc_grpc_library(
name = "test_objc",
use_well_known_protos = True,
deps = [
"//src/objective-c/examples:test_proto",
],
)
grpc_objc_examples_library(
name = "Sample-lib",
srcs = glob(["Sample/Sample/**/*.m"]),
hdrs = glob(["Sample/Sample/**/*.h"]),
data = glob([
"Sample/Sample/Base.lproj/**",
"Sample/Sample/Images.xcassets/**",
]),
)
ios_application(
name = "Sample",
bundle_id = "io.grpc.Sample",
families = [
"iphone",
"ipad",
],
infoplists = ["Sample/Sample/Info.plist"],
minimum_os_version = "9.0",
visibility = ["//visibility:public"],
deps = ["Sample-lib"],
)
grpc_objc_examples_library(
name = "InterceptorSample-lib",
srcs = glob(["InterceptorSample/InterceptorSample/**/*.m"]),
hdrs = glob(["InterceptorSample/InterceptorSample/**/*.h"]),
data = glob([
"InterceptorSample/InterceptorSample/Base.lproj/**",
"InterceptorSample/InterceptorSample/Images.xcassets/**",
]),
)
ios_application(
name = "InterceptorSample",
bundle_id = "io.grpc.InterceptorSample",
families = [
"iphone",
"ipad",
],
infoplists = ["InterceptorSample/InterceptorSample/Info.plist"],
minimum_os_version = "9.0", # Safe Area Layout Guide used
deps = ["InterceptorSample-lib"],
)
grpc_objc_examples_library(
name = "tvOS-sample-lib",
srcs = glob(["tvOS-sample/tvOS-sample/**/*.m"]),
hdrs = glob(["tvOS-sample/tvOS-sample/**/*.h"]),
data = glob([
"tvOS-sample/tvOS-sample/Base.lproj/**",
"tvOS-sample/tvOS-sample/Images.xcassets/**",
]),
)
# c-ares does not support tvOS CPU architecture with Bazel yet
tvos_application(
name = "tvOS-sample",
bundle_id = "io.grpc.tvOS-sample",
infoplists = ["tvOS-sample/tvOS-sample/Info.plist"],
minimum_os_version = "10.0",
deps = [":tvOS-sample-lib"],
)
grpc_objc_examples_library(
name = "watchOS-sample-iOS-lib",
srcs = glob(["watchOS-sample/watchOS-sample/**/*.m"]),
hdrs = glob(["watchOS-sample/watchOS-sample/**/*.h"]),
data = glob([
"watchOS-sample/watchOS-sample/Base.lproj/**",
"watchOS-sample/watchOS-sample/Images.xcassets/**",
]),
)
grpc_objc_examples_library(
name = "watchOS-sample-extension-lib",
srcs = glob(["watchOS-sample/WatchKit-Extention/**/*.m"]),
hdrs = glob(["watchOS-sample/WatchKit-Extension/**/*.h"]),
sdk_frameworks = [
"WatchConnectivity",
"WatchKit",
],
)
ios_application(
name = "watchOS-sample",
bundle_id = "io.grpc.watchOS-sample",
families = ["iphone"],
infoplists = ["watchOS-sample/watchOS-sample/Info.plist"],
minimum_os_version = "9.0", # Safe Area Layout Guide used
watch_application = "watchOS-sample-watchApp",
deps = [":watchOS-sample-iOS-lib"],
)
# c-ares does not support watchOS CPU architecture with Bazel yet
watchos_application(
name = "watchOS-sample-watchApp",
bundle_id = "io.grpc.watchOS-sample.watchkitapp",
extension = ":watchOS-sample-extension",
infoplists = ["watchOS-sample/WatchKit-App/Info.plist"],
minimum_os_version = "4.0",
storyboards = ["watchOS-sample/WatchKit-App/Base.lproj/Interface.storyboard"],
)
watchos_extension(
name = "watchOS-sample-extension",
bundle_id = "io.grpc.watchOS-sample.watchkitapp.watchkitextension",
infoplists = ["watchOS-sample/WatchKit-Extension/Info.plist"],
minimum_os_version = "4.0",
deps = [":watchOS-sample-extension-lib"],
)