From 16773f119f36b7534f8098be289ede6c15247e0a Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Thu, 10 Jun 2021 15:28:09 -0700 Subject: [PATCH] Refer to build_bazel_rules_swift_index_import via a file rather than inline string For consistency with other repos that do not define their own build files --- swift/repositories.bzl | 11 +---------- .../BUILD.overlay | 9 +++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 third_party/build_bazel_rules_swift_index_import/BUILD.overlay diff --git a/swift/repositories.bzl b/swift/repositories.bzl index c27e0c466..14c7634b9 100644 --- a/swift/repositories.bzl +++ b/swift/repositories.bzl @@ -114,16 +114,7 @@ def swift_rules_dependencies(): _maybe( http_archive, name = "build_bazel_rules_swift_index_import", - build_file_content = """\ -load("@bazel_skylib//rules:native_binary.bzl", "native_binary") - -native_binary( - name = "index_import", - src = "index-import", - out = "index-import", - visibility = ["//visibility:public"], -) -""", + build_file = "@build_bazel_rules_swift//third_party/build_bazel_rules_swift_index_import/BUILD.overlay", canonical_id = "index-import-5.3.2.6", urls = ["https://github.com/MobileNativeFoundation/index-import/releases/download/5.3.2.6/index-import.zip"], sha256 = "61a58363f56c5fd84d4ebebe0d9b5dd90c74ae170405a7b9018e8cf698e679de", diff --git a/third_party/build_bazel_rules_swift_index_import/BUILD.overlay b/third_party/build_bazel_rules_swift_index_import/BUILD.overlay new file mode 100644 index 000000000..13d2855a7 --- /dev/null +++ b/third_party/build_bazel_rules_swift_index_import/BUILD.overlay @@ -0,0 +1,9 @@ +load("@bazel_skylib//rules:native_binary.bzl", "native_binary") + +package(default_visibility = ["//visibility:public"]) + +native_binary( + name = "index_import", + src = "index-import", + out = "index-import", +)