-
Notifications
You must be signed in to change notification settings - Fork 3
/
BUILD.bazel
44 lines (40 loc) · 1006 Bytes
/
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
load(
"@rules_xcodeproj//xcodeproj:defs.bzl",
"top_level_target",
"xcodeproj",
)
# Xcode
xcodeproj(
name = "xcodeproj",
project_name = "App",
top_level_targets = [
top_level_target(
"//app",
target_environments = ["simulator"],
),
top_level_target(
"//modules/API:APITests",
target_environments = ["simulator"],
),
top_level_target(
"//modules/Models:ModelsTests",
target_environments = ["simulator"],
),
],
)
# tools
genrule(
name = "lint",
srcs = [],
outs = ["lint.sh"],
cmd = """
echo "set -e" > "$@"
echo "./$(location @buildifier_prebuilt//:buildifier) -lint fix -mode fix -r \\$$BUILD_WORKSPACE_DIRECTORY" >> "$@"
echo "./$(location @SwiftLint//:swiftlint) --fix \\$$BUILD_WORKSPACE_DIRECTORY" >> "$@"
""",
executable = True,
tools = [
"@SwiftLint//:swiftlint",
"@buildifier_prebuilt//:buildifier",
],
)