Skip to content

Commit e4f6ee5

Browse files
anandoleecopybara-github
authored andcommitted
Add Bazel9 test
#test-continuous PiperOrigin-RevId: 891979815
1 parent 106f474 commit e4f6ee5

23 files changed

Lines changed: 171 additions & 350 deletions

File tree

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LINT.IfChange(bazelci_presubmit)
22
matrix:
33
platform: ["debian10", "macos", "macos_arm64", "ubuntu2004", "windows"]
4-
bazel: [8.x]
4+
bazel: [8.x, 9.x]
55

66
tasks:
77
verify_targets:

.bazeliskrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
USE_BAZEL_VERSION=8.0.1
1+
USE_BAZEL_VERSION=8.6.0

.bazelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
33
# TODO: ErrorProne's SelfAssertions are violated in protobuf's test
44
build --javacopt=-Xep:SelfAssertion:WARN
55

6+
build --java_header_compilation=false
7+
8+
build --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=false
9+
610
# This flag works around some issues with Rust linking.
711
build --@rules_rust//rust/settings:experimental_use_cc_common_link=True
812

@@ -39,5 +43,9 @@ common --enable_platform_specific_config
3943

4044
common --incompatible_check_testonly_for_output_files
4145

46+
# Import Bazel 9 specific flags (such as --repo_contents_cache)
47+
# TODO: Remove it when --repo_contents_cache issue has been resolved in bazel
48+
try-import-if-bazel-version >=9.0.0 %workspace%/ci/bazel9.bazelrc
49+
4250
# Use clang-cl by default on Windows (see https://github.com/protocolbuffers/protobuf/issues/20085).
4351
build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl --extra_execution_platforms=//build_defs:x64_windows-clang-cl --host_platform=//build_defs:x64_windows-clang-cl

.bcr/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ bcr_test_module:
33
module_path: examples
44
matrix:
55
platform: ["debian10", "macos", "macos_arm64", "ubuntu2004", "windows"]
6-
bazel: [8.x]
6+
bazel: [8.x, 9x]
77

88
tasks:
99
verify_targets:

.github/workflows/test_bazel.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
runner: [ ubuntu, windows, macos ]
30-
bazelversion: [ '8.0.0' ]
30+
bazelversion: [ '8.6.0', '9.0.0' ]
3131
bzlmod: [ true, false ]
3232
toolchain_resolution:
3333
# Default flags, uses from prebuilt protoc
@@ -36,6 +36,9 @@ jobs:
3636
- "--incompatible_enable_proto_toolchain_resolution=false"
3737
# Uses protoc from source.
3838
- "--@com_google_protobuf//bazel/flags:prefer_prebuilt_protoc=false"
39+
exclude:
40+
- bazelversion: '9.0.0'
41+
bzlmod: false
3942
runs-on: ${{ matrix.runner }}-latest
4043
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Examples ${{ matrix.runner }} ${{ matrix.bazelversion }}${{ matrix.bzlmod && ' (bzlmod)' || '' }} ${{ matrix.toolchain_resolution && ' (toolchain resolution)' || '' }}
4144
steps:
@@ -71,6 +74,9 @@ jobs:
7174
- name: Run tests
7275
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
7376
uses: protocolbuffers/protobuf-ci/bazel@v5
77+
# Set BAZEL_SH for bazel 8.6.0 WORKSPACE on windows
78+
env:
79+
${{ runner.os == 'Windows' && 'BAZEL_SH' || '_' }}: C:\Program Files\Git\bin\bash.exe
7480
with:
7581
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
7682
bazel-cache: examples-${{ matrix.bazelversion }}-${{ matrix.bzlmod }}-${{ matrix.toolchain_resolution }}
@@ -84,7 +90,7 @@ jobs:
8490
fail-fast: false
8591
matrix:
8692
runner: [ ubuntu, windows, macos ]
87-
bazelversion: [ '8.0.0' ]
93+
bazelversion: [ '8.6.0', '9.0.0' ]
8894
bzlmod: [ true ]
8995
toolchain_resolution:
9096
# Default flags, uses from prebuilt protoc
@@ -122,7 +128,7 @@ jobs:
122128
- name: Run tests
123129
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
124130
with:
125-
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:8.0.1-d415763a389bb62a6f126b08c992e83f9f7dc1b4
131+
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:9.0.0-7932bf8b25fb76a111e7257d151a6a58d5c3c671
126132
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
127133
bazel-cache: "bazel-tests"
128134
bazel: test //bazel/...
@@ -145,4 +151,4 @@ jobs:
145151
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
146152
bazel-cache: "bazel-tests-${{ matrix.runner }}"
147153
bazel: test //bazel/...
148-
version: 8.0.1
154+
version: 8.6.0

.github/workflows/test_cpp.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ jobs:
4444
cache_key: Bazel8
4545
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:8.0.1-d415763a389bb62a6f126b08c992e83f9f7dc1b4"
4646
targets: "//src/... //third_party/utf8_range/..."
47+
- config: { name: "Bazel9", flags: "--cxxopt=-Wno-self-assign-overloaded" }
48+
cache_key: Bazel9
49+
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:9.0.0-7932bf8b25fb76a111e7257d151a6a58d5c3c671"
50+
targets: "//src/... //third_party/utf8_range/..."
4751
- config: { name: "TCMalloc" }
4852
cache_key: TcMalloc
4953
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc:8.0.1-d415763a389bb62a6f126b08c992e83f9f7dc1b4"

.github/workflows/test_java.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,27 @@ jobs:
3030
include:
3131
- name: OpenJDK 8
3232
cache_key: '8'
33-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-8-b77fdae6d4771789dfc66a56bf8d806354e8011a
33+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-11-1c31a2985011c75c33dcdf646fc86898aac1ec5d
3434
# TODO: b/318555165 - enable the layering check. Currently it does
3535
# not work correctly with the toolchain in this Docker image.
3636
targets: //java/... //java/internal:java_version --features=-layering_check
3737
flags: --java_language_version=8
3838
- name: OpenJDK 11
3939
cache_key: '11'
40-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-11-b77fdae6d4771789dfc66a56bf8d806354e8011a
40+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-11-1c31a2985011c75c33dcdf646fc86898aac1ec5d
4141
targets: //java/... //java/internal:java_version //compatibility/...
4242
continuous-only: true
4343
- name: OpenJDK 17
4444
cache_key: '17'
45-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-17-168f9c9d015a0fa16611e1e9eede796fe9bfbb69
45+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-17-1c31a2985011c75c33dcdf646fc86898aac1ec5d
46+
targets: //java/... //java/internal:java_version //compatibility/...
47+
- name: OpenJDK 21 bazel 8
48+
cache_key: 'bazel8'
49+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.6.0-21-856ad422dddd3b8fbd85e36129496b37bba174ef
4650
targets: //java/... //java/internal:java_version //compatibility/...
4751
- name: OpenJDK 21
4852
cache_key: '21'
49-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-21-7932bf8b25fb76a111e7257d151a6a58d5c3c671
53+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-21-1c31a2985011c75c33dcdf646fc86898aac1ec5d
5054
targets: //java/... //java/internal:java_version //compatibility/...
5155
# TODO: b/395623141 - restore this test once runtime uses / emulates aarch64.
5256
# - name: aarch64
@@ -101,7 +105,7 @@ jobs:
101105
- name: Generate maven artifacts with bazel and install using maven
102106
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
103107
with:
104-
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8.0.1-11-b77fdae6d4771789dfc66a56bf8d806354e8011a
108+
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:9.0.0-11-1c31a2985011c75c33dcdf646fc86898aac1ec5d
105109
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
106110
bazel-cache: java_linux/11
107111
bash: |

.github/workflows/test_ruby.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ jobs:
3535
- { name: Ruby 3.2, ruby: ruby-3.2.6, continuous-only: true }
3636
- { name: Ruby 3.3, ruby: ruby-3.3.6, continuous-only: true }
3737
- { name: Ruby 3.4, ruby: ruby-3.4.1, continuous-only: true }
38-
# TODO: Remove the image property in the two entries below and update the configuration
39-
# used by all the images the next time there is an update to the Dockerfile
40-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
41-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
38+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE }
39+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI }
40+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
41+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.4.4, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
4242
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: NATIVE }
4343
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: FFI }
44+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
45+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
4446

4547
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Linux ${{ matrix.name }} ${{ matrix.ffi == 'FFI' && ' FFI' || '' }}
4648
runs-on: ubuntu-latest
@@ -54,10 +56,10 @@ jobs:
5456
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
5557
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
5658
with:
57-
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-{0}-b77fdae6d4771789dfc66a56bf8d806354e8011a', matrix.ruby) }}
59+
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:9.0.0-{0}-9fc33a0c378b5affd3c85d3f5ae4f330993048f7', matrix.ruby) }}
5860
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
5961
bazel-cache: ruby_linux/${{ matrix.ruby }}
60-
bazel: test //ruby/... //ruby/tests:ruby_version --test_env=KOKORO_RUBY_VERSION --test_env=BAZEL=true ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled --test_env=PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION=FFI' || '' }}
62+
bazel: test //ruby/... //ruby/tests:ruby_version --action_env=PATH --test_env=KOKORO_RUBY_VERSION --test_env=BAZEL=true ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled --test_env=PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION=FFI' || '' }}
6163
# Useful tool for troubleshooting, but the action introduces flakes as well,
6264
# e.g. https://github.com/actions/upload-artifact/issues/569
6365
# - name: Archive log artifacts
@@ -172,10 +174,10 @@ jobs:
172174
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
173175
uses: protocolbuffers/protobuf-ci/bazel@v5
174176
with:
175-
version: 8.0.1 # Bazel version
177+
version: 9.0.0 # Bazel version
176178
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
177179
bazel-cache: ruby_macos/${{ matrix.version }}
178-
bazel: test //ruby/... --test_env=KOKORO_RUBY_VERSION=${{ matrix.version }} --test_env=BAZEL=true ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled --test_env=PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION=FFI' || '' }}
180+
bazel: test //ruby/... --test_env=KOKORO_RUBY_VERSION=${{ matrix.version }} --action_env=PATH --test_env=BAZEL=true ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled --test_env=PROTOCOL_BUFFERS_RUBY_IMPLEMENTATION=FFI' || '' }}
179181

180182
# This test should always be skipped on presubmit
181183
test_ruby_gems:
@@ -187,13 +189,17 @@ jobs:
187189
# Ruby versions for CRuby and JRuby.
188190
- { name: Ruby 3.1, ruby: ruby-3.1.6, ffi: NATIVE }
189191
- { name: Ruby 3.1, ruby: ruby-3.1.6, ffi: FFI }
190-
- { name: Ruby 3.2, ruby: ruby-3.2.6, continuous-only: true}
191-
- { name: Ruby 3.3, ruby: ruby-3.3.6, continuous-only: true}
192+
- { name: Ruby 3.2, ruby: ruby-3.2.6, continuous-only: true }
193+
- { name: Ruby 3.3, ruby: ruby-3.3.6, continuous-only: true }
192194
- { name: Ruby 3.4, ruby: ruby-3.4.1, continuous-only: true }
193-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
194-
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-ruby-4.0.0-f1c24ed6acfbf6ec709b0de2f702209c9d3ac659' }
195+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: NATIVE }
196+
- { name: Ruby 4.0, ruby: ruby-4.0.0, ffi: FFI }
197+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.0.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
198+
- { name: Ruby 4.0 bazel 8, ruby: ruby-4.4.4, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-ruby-4.0.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
195199
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: NATIVE }
196200
- { name: JRuby 9.4, ruby: jruby-9.4.9.0, ffi: FFI, continuous-only: true }
201+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: NATIVE, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
202+
- { name: JRuby 9.4 bazel 8, ruby: jruby-9.4.9.0, ffi: FFI, image: 'us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.6.0-jruby-9.4.9.0-856ad422dddd3b8fbd85e36129496b37bba174ef' }
197203
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Install ${{ matrix.name }}${{ matrix.ffi == 'FFI' && ' FFI' || '' }}
198204
runs-on: ubuntu-latest
199205
steps:
@@ -206,14 +212,14 @@ jobs:
206212
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
207213
uses: protocolbuffers/protobuf-ci/bazel-docker@v5
208214
with:
209-
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:8.0.1-{0}-b77fdae6d4771789dfc66a56bf8d806354e8011a', matrix.ruby) }}
215+
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/ruby:9.0.0-{0}-9fc33a0c378b5affd3c85d3f5ae4f330993048f7', matrix.ruby) }}
210216
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
211217
bazel-cache: ruby_install/${{ matrix.ruby }}_${{ matrix.bazel }}
212218
bash: >
213219
bazel --version;
214220
ruby --version;
215-
./regenerate_stale_files.sh $BAZEL_FLAGS;
216-
bazel build //ruby:release //:protoc ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled' || '' }} $BAZEL_FLAGS;
221+
./regenerate_stale_files.sh --action_env=PATH $BAZEL_FLAGS;
222+
bazel build //ruby:release //:protoc --test_env=KOKORO_RUBY_VERSION ${{ matrix.ffi == 'FFI' && '--//ruby:ffi=enabled' || '' }} --action_env=PATH $BAZEL_FLAGS;
217223
gem install bazel-bin/ruby/google-protobuf-*;
218224
bazel-bin/protoc --proto_path=src --proto_path=ruby/tests --proto_path=ruby --ruby_out=ruby tests/test_import_proto2.proto;
219225
bazel-bin/protoc --proto_path=src --proto_path=ruby/tests --proto_path=ruby --ruby_out=ruby tests/basic_test.proto;

MODULE.bazel

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module(
1414
# https://bazel.build/versions/6.0.0/build/bzlmod#version-resolution
1515
# Thus the highest version in their module graph is resolved.
1616

17-
bazel_dep(name = "apple_support", version = "1.16.0", repo_name = "build_bazel_apple_support")
17+
bazel_dep(name = "apple_support", version = "2.3.0", repo_name = "build_bazel_apple_support")
1818

1919
# Unused but must be pinned to avoid old broken versions
2020
bazel_dep(name = "rules_proto", version = "7.1.0")
@@ -40,7 +40,7 @@ bazel_dep(name = "rules_kotlin", version = "2.2.2")
4040
bazel_dep(name = "rules_license", version = "1.0.0")
4141
bazel_dep(name = "rules_pkg", version = "1.0.1")
4242
bazel_dep(name = "rules_python", version = "1.6.0")
43-
bazel_dep(name = "rules_rust", version = "0.63.0")
43+
bazel_dep(name = "rules_rust", version = "0.69.0")
4444

4545
bazel_dep(name = "rules_ruby", version = "0.20.1", dev_dependency = True)
4646

@@ -65,6 +65,14 @@ single_version_override(
6565
],
6666
)
6767

68+
# Workaround for https://github.com/open-source-parsers/jsoncpp/issues/1672
69+
# Remove the git_override after the commit is in BCR
70+
#git_override(
71+
# module_name = "jsoncpp",
72+
# remote = "https://github.com/open-source-parsers/jsoncpp.git",
73+
# commit = "d27ab8088f588b664bce821d261235c33943e294",
74+
#)
75+
6876
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
6977
bazel_dep(name = "rules_shell", version = "0.6.1")
7078
bazel_dep(name = "platforms", version = "0.0.11")
@@ -238,6 +246,39 @@ maven.install(
238246
],
239247
)
240248

249+
# Starting with Bazel 8, native Android rules were marked for removal
250+
# from the core Bazel binary. For Bazel 9, these native rules are completely
251+
# gone, making the use of the external rules_android repository and
252+
# explicit load statements mandatory.
253+
bazel_dep(name = "rules_android", version = "0.7.1")
254+
# override protobuf for rules_android
255+
maven.install(
256+
name = "android_ide_common_30_1_3",
257+
artifacts = [
258+
"com.google.protobuf:protobuf-java:4.34.0",
259+
"com.google.protobuf:protobuf-java-util:4.34.0",
260+
],
261+
known_contributing_modules = ["rules_android"],
262+
repositories = [
263+
"https://maven.google.com",
264+
"https://repo1.maven.org/maven2",
265+
],
266+
use_starlark_android_rules = True,
267+
)
268+
maven.install(
269+
name = "rules_android_maven",
270+
artifacts = [
271+
"com.google.protobuf:protobuf-java:4.34.0",
272+
"com.google.protobuf:protobuf-java-util:4.34.0",
273+
],
274+
known_contributing_modules = ["rules_android"],
275+
repositories = [
276+
"https://maven.google.com",
277+
"https://repo1.maven.org/maven2",
278+
],
279+
use_starlark_android_rules = True,
280+
)
281+
241282
# Use the default "maven" namespace because protobuf java targets are exposed to users
242283
# See https://github.com/protocolbuffers/protobuf/issues/21177
243284
use_repo(maven, "maven")
@@ -308,17 +349,16 @@ archive_override(
308349
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v25.0/protobuf-25.0.tar.gz"],
309350
)
310351

311-
bazel_dep(name = "com_google_protobuf_previous_release", version = "29.0", dev_dependency = True)
352+
bazel_dep(name = "com_google_protobuf_previous_release", version = "33.0", dev_dependency = True)
312353
archive_override(
313354
module_name = "com_google_protobuf_previous_release",
314-
integrity = "sha256-EKDVjzmhqQnpXgDougtbHcZNApl/dBFRlTorNln254w=",
355+
integrity = "sha256-y8U2BkcGtijc/lB77zhu8+IhTVY2V2EilvF4GqFV7gc=",
315356
patch_strip = 1,
316357
patches = [
317-
"@com_google_protobuf//:patches/protobuf_v29/0001-Update-module-name.patch",
318-
"@com_google_protobuf//:patches/protobuf_v29/0002-bazel9.patch",
358+
"@com_google_protobuf//:patches/protobuf_v33/0001-Update-module-name.patch",
319359
],
320-
strip_prefix = "protobuf-29.0",
321-
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v29.0/protobuf-29.0.tar.gz"],
360+
strip_prefix = "protobuf-33.0",
361+
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protobuf-33.0.tar.gz"],
322362
)
323363

324364
# Register C++ toolchains for cross-compilation. These are used for compiling release binaries of

0 commit comments

Comments
 (0)