From 45aecbe3555c1da36cfbfaff0622646923d5137c Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 21 Dec 2023 14:10:46 -0800 Subject: [PATCH] [Tool] Added Bazel 7 basic support (#35362) - Added Bazel 7 to the support bazel versions. - Changed the default Bazel version to 7. - Fixed Android Binder build issue. Closes #35362 PiperOrigin-RevId: 592946781 --- WORKSPACE | 2 +- bazel/supported_versions.txt | 1 + bazel/update_mirror.sh | 3 +++ doc/bazel_support.md | 1 + src/core/BUILD | 5 ++++- tools/bazelify_tests/test/supported_bazel_versions.bzl | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 472d904c525..1217f0c954a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -48,7 +48,7 @@ android_workspace() # be invoked by binder transport implementation through JNI. local_repository( name = "binder_transport_android_helper", - path = "./src/core/ext/transport/binder/java", + path = "src/core/ext/transport/binder/java", ) # Prevents bazel's '...' expansion from including the following folder. diff --git a/bazel/supported_versions.txt b/bazel/supported_versions.txt index 19b860c1872..1197e4958b6 100644 --- a/bazel/supported_versions.txt +++ b/bazel/supported_versions.txt @@ -1 +1,2 @@ 6.4.0 +7.0.0 diff --git a/bazel/update_mirror.sh b/bazel/update_mirror.sh index b2677283c35..c5f6c84b487 100755 --- a/bazel/update_mirror.sh +++ b/bazel/update_mirror.sh @@ -60,6 +60,9 @@ function upload { upload github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-linux-x86_64 upload github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-darwin-x86_64 upload github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-windows-x86_64.exe +upload github.com/bazelbuild/bazel/releases/download/7.0.0/bazel-7.0.0-linux-x86_64 +upload github.com/bazelbuild/bazel/releases/download/7.0.0/bazel-7.0.0-darwin-x86_64 +upload github.com/bazelbuild/bazel/releases/download/7.0.0/bazel-7.0.0-windows-x86_64.exe # Collect the github archives to mirror from grpc_deps.bzl grep -o '"https://github.com/[^"]*"' bazel/grpc_deps.bzl | sed 's/^"https:\/\///' | sed 's/"$//' | while read -r line ; do diff --git a/doc/bazel_support.md b/doc/bazel_support.md index d51dfebd996..bcbf7397ee2 100644 --- a/doc/bazel_support.md +++ b/doc/bazel_support.md @@ -44,3 +44,4 @@ compatibility range. The currently supported versions are captured by the following list: - [`6.4.0`](https://github.com/bazelbuild/bazel/releases/tag/6.4.0) +- [`7.0.0`](https://github.com/bazelbuild/bazel/releases/tag/7.0.0) diff --git a/src/core/BUILD b/src/core/BUILD index e5be1db3486..523fae21830 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -33,7 +33,10 @@ package( # the top-level BUILD file that have not yet been moved here. Should go away # once the transition is complete. exports_files( - glob(["**"]), + glob( + ["**"], + exclude = ["ext/transport/binder/java/**"], + ), visibility = ["//:__subpackages__"], ) diff --git a/tools/bazelify_tests/test/supported_bazel_versions.bzl b/tools/bazelify_tests/test/supported_bazel_versions.bzl index f9b527e82b0..d83471d3061 100644 --- a/tools/bazelify_tests/test/supported_bazel_versions.bzl +++ b/tools/bazelify_tests/test/supported_bazel_versions.bzl @@ -18,4 +18,5 @@ This file is generated from the supported_bazel_versions.bzl.template SUPPORTED_BAZEL_VERSIONS = [ "6.4.0", + "7.0.0", ]