|
| 1 | +"""rules_swift MODULE.bazel file""" |
| 2 | + |
| 3 | +module( |
| 4 | + name = "rules_swift", |
| 5 | + version = "3.3.0", |
| 6 | + bazel_compatibility = [">=7.0.0"], |
| 7 | + compatibility_level = 3, |
| 8 | + repo_name = "build_bazel_rules_swift", |
| 9 | +) |
| 10 | + |
| 11 | +bazel_dep(name = "bazel_features", version = "1.30.0") |
| 12 | +bazel_dep(name = "bazel_skylib", version = "1.7.1") |
| 13 | +bazel_dep(name = "apple_support", version = "1.24.2", repo_name = "build_bazel_apple_support") |
| 14 | +bazel_dep(name = "rules_cc", version = "0.2.14") |
| 15 | +bazel_dep(name = "rules_shell", version = "0.3.0") |
| 16 | +bazel_dep(name = "platforms", version = "0.0.11") |
| 17 | +bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf") |
| 18 | +bazel_dep(name = "nlohmann_json", version = "3.12.0", repo_name = "com_github_nlohmann_json") |
| 19 | +bazel_dep( |
| 20 | + name = "swift_argument_parser", |
| 21 | + version = "1.3.1.2", |
| 22 | + repo_name = "com_github_apple_swift_argument_parser", |
| 23 | +) |
| 24 | + |
| 25 | +non_module_deps = use_extension("//swift:extensions.bzl", "non_module_deps") |
| 26 | +use_repo( |
| 27 | + non_module_deps, |
| 28 | + "build_bazel_rules_swift_index_import_5_8", |
| 29 | + "build_bazel_rules_swift_index_import_6_1", |
| 30 | + "build_bazel_rules_swift_local_config", |
| 31 | + "com_github_apple_swift_docc_symbolkit", |
| 32 | + "com_github_apple_swift_log", |
| 33 | + "com_github_apple_swift_nio", |
| 34 | + "com_github_apple_swift_nio_extras", |
| 35 | + "com_github_apple_swift_nio_http2", |
| 36 | + "com_github_apple_swift_nio_transport_services", |
| 37 | + "com_github_apple_swift_protobuf", |
| 38 | + "com_github_grpc_grpc_swift", |
| 39 | +) |
| 40 | + |
| 41 | +apple_cc_configure = use_extension("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension") |
| 42 | +use_repo(apple_cc_configure, "local_config_apple_cc") |
| 43 | + |
| 44 | +register_toolchains("@build_bazel_rules_swift_local_config//:all") |
| 45 | + |
| 46 | +# Dev dependencies |
| 47 | +bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True) |
| 48 | +bazel_dep(name = "gazelle", version = "0.46.0", dev_dependency = True, repo_name = "bazel_gazelle") |
| 49 | +bazel_dep(name = "rules_go", version = "0.58.3", dev_dependency = True) # TODO: Remove when transitives update past this version |
| 50 | +bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True, repo_name = "io_bazel_stardoc") |
| 51 | + |
| 52 | +http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 53 | + |
| 54 | +http_archive( |
| 55 | + name = "SwiftSyntax", |
| 56 | + dev_dependency = True, |
| 57 | + sha256 = "527a5c6d19987acbb5019efa067b0fbd127e06187a0689c3f1098fd22c1a7d43", |
| 58 | + strip_prefix = "swift-syntax-01fc3e3ed4d26121c06790abf8fe5ddaa22a4cc5", |
| 59 | + url = "https://github.com/apple/swift-syntax/archive/01fc3e3ed4d26121c06790abf8fe5ddaa22a4cc5.tar.gz", |
| 60 | +) |
| 61 | + |
| 62 | +# TODO: In stardoc 0.7.1+, the `load` statements added to the docs are relative to the `alias` targets which is incorrect. |
| 63 | +# To keep the docs without confusing load statements we patch a partial revert of: https://github.com/bazelbuild/stardoc/pull/216 |
| 64 | +single_version_override( |
| 65 | + module_name = "stardoc", |
| 66 | + patch_strip = 1, |
| 67 | + patches = ["//third_party/patches:stardoc-revert-load-statements-in-docs.patch"], |
| 68 | +) |
0 commit comments