remove usages of native http archive
diff --git a/.bazelrc b/.bazelrc
index ec72b2f..6c4d67d 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -3,4 +3,6 @@
build --verbose_failures
# Cannot use this until skydoc removes filetypes as well.
-# build --incompatible_disallow_filetype
\ No newline at end of file
+# build --incompatible_disallow_filetype
+build --incompatible_remove_native_git_repository
+build --incompatible_remove_native_http_archive
diff --git a/kotlin/internal/bootstrap.bzl b/kotlin/internal/bootstrap.bzl
index 65031b4..0f51245 100644
--- a/kotlin/internal/bootstrap.bzl
+++ b/kotlin/internal/bootstrap.bzl
@@ -15,6 +15,7 @@
load("//kotlin/internal:kt.bzl", "kt")
load("//kotlin/internal:rules.bzl", _kt_jvm_import_impl="kt_jvm_import_impl")
+load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive="http_archive")
kotlin_stdlib = rule(
attrs = {
@@ -57,7 +58,7 @@
def github_archive(name, repo, commit, build_file_content = None):
if build_file_content:
- native.new_http_archive(
+ _http_archive(
name = name,
strip_prefix = "%s-%s" % (repo.split("/")[1], commit),
url = "https://github.com/%s/archive/%s.zip" % (repo, commit),
@@ -65,7 +66,7 @@
build_file_content = build_file_content,
)
else:
- native.http_archive(
+ _http_archive(
name = name,
strip_prefix = "%s-%s" % (repo.split("/")[1], commit),
url = "https://github.com/%s/archive/%s.zip" % (repo, commit),
diff --git a/kotlin/kotlin_compiler_repositories.bzl b/kotlin/kotlin_compiler_repositories.bzl
index 5f56c85..d338141 100644
--- a/kotlin/kotlin_compiler_repositories.bzl
+++ b/kotlin/kotlin_compiler_repositories.bzl
@@ -13,7 +13,7 @@
# limitations under the License.
"""This file contains the Kotlin compiler repository definitions. It should not be loaded directly by client workspaces.
"""
-
+load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_file="http_file", _http_archive="http_archive")
load(
"//kotlin/internal:kt.bzl",
_kt = "kt",
@@ -189,7 +189,7 @@
if not release:
fail('"%s" not a valid kotlin release, current release is "%s"' % (kotlin_release_version, KOTLIN_CURRENT_RELEASE))
- native.new_http_archive(
+ _http_archive(
name = _kt.defs.KT_COMPILER_REPO,
url = release["url"],
sha256 = release["sha256"],
@@ -197,11 +197,11 @@
strip_prefix = "kotlinc",
)
- native.http_file(
+ _http_file(
name = "kt_java_stub_template",
- url = ("https://raw.githubusercontent.com/bazelbuild/bazel/" +
+ urls = [("https://raw.githubusercontent.com/bazelbuild/bazel/" +
_BAZEL_JAVA_LAUNCHER_VERSION +
"/src/main/java/com/google/devtools/build/lib/bazel/rules/java/" +
- "java_stub_template.txt"),
+ "java_stub_template.txt")],
sha256 = "86660ee7d5b498ccf611a1e000564f45268dbf301e0b2b08c984dcecc6513f6e",
)