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: I938a7c55793f294461d3517556aa13e029012936
diff --git a/tools/bazlets.bzl b/tools/bazlets.bzl
index de1b5d2..90336ca 100644
--- a/tools/bazlets.bzl
+++ b/tools/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 = None,
local_path = None):
if not local_path:
- native.git_repository(
+ git_repository(
name = NAME,
remote = "https://gerrit.googlesource.com/bazlets",
commit = commit,