forked from bazel-xcode/xchammer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
109 lines (98 loc) · 2.47 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
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
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@build_bazel_rules_apple//apple:macos.bzl",
"macos_application",
)
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"swift_library",
)
load(
"@build_bazel_rules_apple//apple:versioning.bzl",
"apple_bundle_version",
)
load(
"@com_github_bazelbuild_buildtools//buildifier:def.bzl",
"buildifier",
)
load(
"//third_party:repositories.bzl",
"namespaced_name",
)
load(
"//tools:xchammerconfig.bzl",
"xchammer_config",
"gen_xchammer_config",
"project_config",
"target_config",
"execution_action",
"scheme_action_config",
)
swift_library(
name = "Sources",
srcs = glob(["Sources/**/*.swift"]),
structured_resources = glob([
"XCHammerAssets/**",
]),
deps = ["@" + namespaced_name(x) for x in [
"AEXML//:AEXML",
"Commandant//:Commandant",
"Commander//:Commander",
"JSONUtilities//:JSONUtilities",
"PathKit//:PathKit",
"Rainbow//:Rainbow",
"Result//:Result",
"ShellOut//:ShellOut",
"Tulsi//src/TulsiGenerator:tulsi_generator_lib",
"XcodeGen//:XcodeGenKit",
"XcodeGen//:ProjectSpec",
"xcproj//:xcproj",
"Yams//:Yams",
]],
)
apple_bundle_version(
name = "XCHammerVersion",
build_version = "1.0",
)
macos_application(
name = "xchammer",
bundle_id = "com.pinterest.xchammer",
infoplists = ["Info.plist"],
minimum_os_version = "10.13",
version = ":XCHammerVersion",
deps = [":Sources"],
)
buildifier(
name = "buildifier"
)
script_base = "$SRCROOT/tools/instrumentation_helpers"
scheme_config={
"Build": scheme_action_config(
pre_actions=[
execution_action(
name="Track build start",
script=script_base + "/statsd_pre_build_action.sh"
)
],
post_actions=[
execution_action(
name="Report build end",
script="python " + script_base + "/statsd_post_build_action.py"
)
]
)
}
xchammer_config = xchammer_config(
targets=["//:xchammer"],
target_config={
"//:xchammer" : target_config(
# Metrics are disabled by default
# scheme_config=scheme_config
)
},
projects={
"xchammer-bazel":
project_config(paths=["**"])
})
gen_xchammer_config(name="xchammer_config", config=xchammer_config)