Skip to content

Commit ff8e900

Browse files
bcorsoDagger Team
authored andcommitted
Upgrade to Bazel 7.2.1
* Added `.bazelversion` to declare Bazel version * Removed unused bazel common dependencies in WORKSPACE * Removed `bazel_skylib` * Removed `rules_proto` * Removed `google_bazel_common` * Removed `rules_python` * Removed `zlib` * Removed obsolete `tools/bazel.rc` config RELNOTES=N/A PiperOrigin-RevId: 654352167
1 parent 140e201 commit ff8e900

File tree

6 files changed

+13
-66
lines changed

6 files changed

+13
-66
lines changed

.bazelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,13 @@ build --host_javacopt=-g
66
# TODO(ronshapiro): explore how much work it would be to reenable this
77
build --javacopt="-Xep:BetaApi:OFF"
88
build --host_javacopt="-Xep:BetaApi:OFF"
9+
10+
# Note: This flag is required to prevent actions from clashing with each when
11+
# reading/writing tmp files. Without this flag we get errors like:
12+
#
13+
# Error: Cannot use file /tmp/hsperfdata_runner/12 because it is locked by
14+
# another process
15+
#
16+
# This flag will be enabled by default in Bazel 7.0.0, but for now we enable it
17+
# manually. For more details: https://github.com/bazelbuild/bazel/issues/3236.
18+
build --incompatible_sandbox_hermetic_tmp

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.4.0

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ env:
1313
USE_JAVA_VERSION: '11'
1414
# This is required by AGP 8.3+.
1515
USE_JAVA_VERSION_FOR_PLUGIN: '17'
16-
# Our Bazel builds currently rely on 6.4.0. The version is set via
17-
# baselisk by USE_BAZEL_VERSION: https://github.com/bazelbuild/bazelisk.
18-
USE_BAZEL_VERSION: '6.4.0'
1916
# The default Maven 3.9.0 has a regression so we manually install 3.8.7.
2017
# https://issues.apache.org/jira/browse/MNG-7679
2118
USE_MAVEN_VERSION: '3.8.7'

.github/workflows/release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ env:
1212
USE_JAVA_VERSION: '11'
1313
# This is required by AGP 8.3+.
1414
USE_JAVA_VERSION_FOR_PLUGIN: '17'
15-
# Our Bazel builds currently rely on 6.4.0. The version is set via
16-
# baselisk by USE_BAZEL_VERSION: https://github.com/bazelbuild/bazelisk.
17-
USE_BAZEL_VERSION: '6.4.0'
1815
DAGGER_RELEASE_VERSION: "${{ github.event.inputs.dagger_release_version }}"
1916
# The default Maven 3.9.0 has a regression so we manually install 3.8.7.
2017
# https://issues.apache.org/jira/browse/MNG-7679

WORKSPACE

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,6 @@ local_repository(
2626
path = "examples/bazel",
2727
)
2828

29-
#############################
30-
# Load Bazel Skylib rules
31-
#############################
32-
33-
BAZEL_SKYLIB_VERSION = "1.5.0"
34-
35-
BAZEL_SKYLIB_SHA = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94"
36-
37-
http_archive(
38-
name = "bazel_skylib",
39-
sha256 = BAZEL_SKYLIB_SHA,
40-
urls = [
41-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/%s/bazel-skylib-%s.tar.gz" % (BAZEL_SKYLIB_VERSION, BAZEL_SKYLIB_VERSION),
42-
"https://github.com/bazelbuild/bazel-skylib/releases/download/%s/bazel-skylib-%s.tar.gz" % (BAZEL_SKYLIB_VERSION, BAZEL_SKYLIB_VERSION),
43-
],
44-
)
45-
46-
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
47-
48-
bazel_skylib_workspace()
49-
5029
#############################
5130
# Load rules_java repository
5231
#############################
@@ -88,32 +67,6 @@ rules_proto_dependencies()
8867

8968
rules_proto_toolchains()
9069

91-
#############################
92-
# Load Protobuf dependencies
93-
#############################
94-
95-
# rules_python and zlib are required by protobuf.
96-
# TODO(ronshapiro): Figure out if zlib is in fact necessary, or if proto can depend on the
97-
# @bazel_tools library directly. See discussion in
98-
# https://github.com/protocolbuffers/protobuf/pull/5389#issuecomment-481785716
99-
# TODO(cpovirk): Should we eventually get rules_python from "Bazel Federation?"
100-
# https://github.com/bazelbuild/rules_python#getting-started
101-
102-
http_archive(
103-
name = "rules_python",
104-
sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6",
105-
strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27",
106-
urls = ["https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz"],
107-
)
108-
109-
http_archive(
110-
name = "zlib",
111-
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
112-
sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
113-
strip_prefix = "zlib-1.2.11",
114-
urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
115-
)
116-
11770
#############################
11871
# Load Robolectric repository
11972
#############################
@@ -301,8 +254,8 @@ maven_install(
301254
"org.ow2.asm:asm:%s" % ASM_VERSION,
302255
"org.ow2.asm:asm-tree:%s" % ASM_VERSION,
303256
"org.ow2.asm:asm-commons:%s" % ASM_VERSION,
304-
"org.robolectric:robolectric:4.4",
305-
"org.robolectric:shadows-framework:4.4", # For ActivityController
257+
"org.robolectric:robolectric:%s" % ROBOLECTRIC_VERSION,
258+
"org.robolectric:shadows-framework:%s" % ROBOLECTRIC_VERSION, # For ActivityController
306259
],
307260
repositories = [
308261
"https://repo1.maven.org/maven2",

tools/bazel.rc

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)