bazlets: Replace native.git_repository with skylark rule
The native.git_repository rule does not work properly when invoked
in a `git submodule foreach` command. Bazel will deprecate the
native rules anyway, so replace with skylark's git_repository.
See [1] for context.
[1] https://github.com/bazelbuild/bazel/issues/6358#issuecomment-429103745
Change-Id: I1862ed62df1018df30fabcaeb818020cbf3f97cf
diff --git a/bazlets.bzl b/bazlets.bzl
index f97b72c..f089af4 100644
--- a/bazlets.bzl
+++ b/bazlets.bzl
@@ -1,10 +1,12 @@
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
+
NAME = "com_googlesource_gerrit_bazlets"
def load_bazlets(
commit,
local_path = None):
if not local_path:
- native.git_repository(
+ git_repository(
name = NAME,
remote = "https://gerrit.googlesource.com/bazlets",
commit = commit,