| 1 | load( |
| 2 | "@rules_xcodeproj//xcodeproj:defs.bzl", |
| 3 | "top_level_target", |
| 4 | "xcodeproj", |
| 5 | ) |
| 6 | |
| 7 | # Xcode |
| 8 | |
| 9 | xcodeproj( |
| 10 | name = "xcodeproj", |
| 11 | project_name = "App", |
| 12 | top_level_targets = [ |
| 13 | top_level_target( |
| 14 | "//frontend/apple/app:app", |
| 15 | target_environments = ["simulator"], |
| 16 | ), |
| 17 | top_level_target( |
| 18 | "//frontend/apple/modules/API:APITests", |
| 19 | target_environments = ["simulator"], |
| 20 | ), |
| 21 | top_level_target( |
| 22 | "//frontend/apple/modules/Models:ModelsTests", |
| 23 | target_environments = ["simulator"], |
| 24 | ), |
| 25 | ], |
| 26 | ) |
| 27 | |
| 28 | # tools |
| 29 | |
| 30 | genrule( |
| 31 | name = "lint", |
| 32 | srcs = [], |
| 33 | outs = ["lint.sh"], |
| 34 | cmd = """ |
| 35 | echo "set -e" > "$@" |
| 36 | echo "./$(location @buildifier_prebuilt//:buildifier) -lint fix -mode fix -r \\$$BUILD_WORKSPACE_DIRECTORY" >> "$@" |
| 37 | echo "./$(location @SwiftLint//:swiftlint) --fix \\$$BUILD_WORKSPACE_DIRECTORY" >> "$@" |
| 38 | """, |
| 39 | executable = True, |
| 40 | tools = [ |
| 41 | "@SwiftLint//:swiftlint", |
| 42 | "@buildifier_prebuilt//:buildifier", |
| 43 | ], |
| 44 | ) |