@@ -14,42 +14,38 @@ def _maybe(repo_rule, name, **kwargs):
14
14
if not native .existing_rule (name ):
15
15
repo_rule (name = name , ** kwargs )
16
16
17
- def swift_index_store_dependencies ():
18
- build_bazel_rules_swift_sha = "40c36c936c9c80b4aefa3f008ecf99dbe002be2c"
19
- _maybe (
20
- http_archive ,
21
- name = "build_bazel_rules_swift" ,
22
- sha256 = "dd08813524deb0b449b0bcbde193caa284f45dd8fd624f9ed4ef1fcbfa78b8a8" ,
23
- url = "https://github.com/bazelbuild/rules_swift/archive/%s.zip" % build_bazel_rules_swift_sha ,
24
- strip_prefix = "rules_swift-%s" % build_bazel_rules_swift_sha ,
25
- )
26
-
27
- build_bazel_rules_apple_sha = "5f036277bd2e1e357fd8502bf0ade9d293cf91b3"
28
- _maybe (
29
- http_archive ,
30
- name = "build_bazel_rules_apple" ,
31
- sha256 = "635de45a7c07daed728962a9be983503221da22b6c6759e2f67f283cbb6cbe37" ,
32
- url = "https://github.com/bazelbuild/rules_apple/archive/%s.zip" % build_bazel_rules_apple_sha ,
33
- strip_prefix = "rules_apple-%s" % build_bazel_rules_apple_sha ,
34
- )
17
+ def swift_index_store_dependencies (bzlmod = False ):
18
+ if not bzlmod :
19
+ _maybe (
20
+ http_archive ,
21
+ name = "build_bazel_rules_swift" ,
22
+ sha256 = "28a66ff5d97500f0304f4e8945d936fe0584e0d5b7a6f83258298007a93190ba" ,
23
+ url = "https://github.com/bazelbuild/rules_swift/releases/download/1.13.0/rules_swift.1.13.0.tar.gz" ,
24
+ )
25
+ _maybe (
26
+ http_archive ,
27
+ name = "build_bazel_rules_apple" ,
28
+ sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7" ,
29
+ url = "https://github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz" ,
30
+ )
35
31
36
32
_maybe (
37
33
http_archive ,
38
34
name = "StaticIndexStore" ,
39
35
url = "https://github.com/keith/StaticIndexStore/releases/download/5.7/libIndexStore.xcframework.zip" ,
40
36
sha256 = "da69bab932357a817aa0756e400be86d7156040bfbea8eded7a3acc529320731" ,
41
37
build_file_content = """
42
- load(
43
- "@build_bazel_rules_apple//apple:apple.bzl",
44
- "apple_static_xcframework_import",
45
- )
38
+ load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_xcframework_import")
46
39
47
40
apple_static_xcframework_import(
48
41
name = "libIndexStore",
49
- visibility = [
50
- "//visibility:public",
51
- ],
42
+ visibility = ["//visibility:public"],
52
43
xcframework_imports = glob(["libIndexStore.xcframework/**"]),
53
44
)
54
45
""" ,
55
46
)
47
+
48
+ def _bzlmod_deps (_ ):
49
+ swift_index_store_dependencies (bzlmod = True )
50
+
51
+ bzlmod_deps = module_extension (implementation = _bzlmod_deps )
0 commit comments