forked from bazel-xcode/xchammer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
73 lines (66 loc) · 1.79 KB
/
BUILD.bazel
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
config_setting(
name = "darwin",
values = {"cpu": "darwin"},
visibility = ["//visibility:public"],
)
config_setting(
name = "darwin_x86_64",
values = {"cpu": "darwin_x86_64"},
visibility = ["//visibility:public"],
)
filegroup(
name = "all",
srcs = [
] + select({
":darwin": ["//ios-app"],
":darwin_x86_64": ["//ios-app"],
"//conditions:default": [],
}),
)
load(
"@xchammer//:BazelExtensions/xchammerconfig.bzl",
"execution_action",
"project_config",
"scheme_action_config",
"target_config",
)
load("@xchammer//:BazelExtensions/xcodeproject.bzl", "xcode_project")
# Spawn the index import action as a background process
app_scheme_config = {
"Build": scheme_action_config(
post_actions = [
execution_action(
name = "Import global index",
script = "$SRCROOT/tools/XCHammerIndexImportAction.sh &",
)],
pre_actions = [],
),
}
# This example is a "Focused" example. We don't generate Xcode target schemes
# and strip out Vendor sources
xcode_project(
name = "XcodeBazel",
targets = [
"//ios-app:ios-app",
"//ios-app:UrlGetClasses",
"//ios-app:UnitTests",
"//ios-app:UnitTestsWithHost",
],
bazel = "tools/bazelwrapper",
project_config = project_config(
build_bazel_platform_options = {
"ios_x86_64": ["--config=ios_x86_64"],
"ios_i386": ["--config=ios_i386"],
"ios_arm64": ["--config=ios_arm64"],
"ios_armv7": ["--config=ios_armv7"],
},
paths = ["ios-app/**"],
generate_xcode_schemes = False,
generate_transitive_xcode_targets = True,
),
target_config = {
"//ios-app:ios-app" : target_config(
scheme_config = app_scheme_config )
},
testonly=True
)