aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlises Mendez Martinez <umendez@google.com>2024-02-28 16:22:53 +0000
committerUlises Mendez Martinez <umendez@google.com>2024-02-28 16:24:07 +0000
commitd343481b6af548fd10e489ac83f51f517911f7da (patch)
treeb5fa362a9e99a26ba38fe27c3983506162fcbb76
parent90bf0bc985ecf237098e6c27ec72a6a505ca39ac (diff)
parentd4c3498677e7fbda6f717585276ea4d8b75acec0 (diff)
downloadbazelbuild-rules-proto-d343481b6af548fd10e489ac83f51f517911f7da.tar.gz
Merge remote-tracking branch 'aosp/upstream-main' into main
Bug: 254734455 Change-Id: I1b3a6778224061c043ccbfd6e4a562575eb4d997
-rw-r--r--.bazelci/presubmit.yml69
-rw-r--r--.bazelrc1
-rw-r--r--.bcr/README.md9
-rw-r--r--.bcr/config.yml3
-rw-r--r--.bcr/metadata.template.json27
-rw-r--r--.bcr/presubmit.yml10
-rw-r--r--.bcr/source.template.json5
-rw-r--r--.gitattributes7
-rw-r--r--.github/workflows/ci.bazelrc15
-rw-r--r--.github/workflows/release.yml18
-rwxr-xr-x.github/workflows/release_prep.sh49
-rw-r--r--.gitignore1
-rw-r--r--.pre-commit-config.yaml12
-rw-r--r--AUTHORS13
-rw-r--r--BUILD10
-rw-r--r--CODEOWNERS1
-rw-r--r--CONTRIBUTING.md38
-rw-r--r--LICENSE202
-rw-r--r--MODULE.bazel19
-rw-r--r--MODULE.bazel.lock1591
-rw-r--r--README.md59
-rw-r--r--WORKSPACE29
-rw-r--r--WORKSPACE.bzlmod0
-rw-r--r--dev_deps.bzl67
-rw-r--r--docs/BUILD12
-rw-r--r--docs/defs.md95
-rw-r--r--docs/stardoc_with_diff_test.bzl111
-rw-r--r--proto/BUILD34
-rw-r--r--proto/README.md6
-rw-r--r--proto/defs.bzl34
-rw-r--r--proto/modules/BUILD11
-rw-r--r--proto/modules/proto_common.bzl53
-rw-r--r--proto/modules/proto_info.bzl18
-rw-r--r--proto/modules/proto_lang_toolchain_info.bzl18
-rw-r--r--proto/private/BUILD7
-rw-r--r--proto/private/native.bzl28
-rw-r--r--proto/private/rules/BUILD26
-rw-r--r--proto/private/rules/proto_descriptor_set.bzl70
-rw-r--r--proto/private/rules/proto_toolchain.bzl40
-rw-r--r--proto/private/rules/proto_toolchain_rule.bzl71
-rw-r--r--proto/proto_descriptor_set.bzl18
-rw-r--r--proto/proto_lang_toolchain.bzl20
-rw-r--r--proto/proto_library.bzl35
-rw-r--r--proto/proto_toolchain.bzl21
-rw-r--r--proto/repositories.bzl49
-rw-r--r--proto/toolchains.bzl21
-rw-r--r--proto/toolchains/BUILD23
-rw-r--r--proto/toolchains/proto_lang_toolchain.bzl47
-rw-r--r--proto/toolchains/proto_toolchain.bzl19
-rw-r--r--tests/BUILD22
-rw-r--r--tests/empty.proto17
-rw-r--r--tests/load_from_macro/BUILD29
-rw-r--r--tests/load_from_macro/foo.proto17
-rw-r--r--tests/load_from_macro/tags.bzl17
-rw-r--r--tests/proto_common/BUILD.bazel3
-rw-r--r--tests/proto_common/toolchains.bzl65
-rw-r--r--tests/rules/proto_descriptor_set/BUILD49
-rw-r--r--tests/rules/proto_descriptor_set/proto_descriptor_set_test.cc105
-rw-r--r--tests/utils/BUILD12
-rw-r--r--tests/utils/workspace_constants.h27
-rw-r--r--tools/file_concat/BUILD9
-rw-r--r--tools/file_concat/main.cc65
62 files changed, 3579 insertions, 0 deletions
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
new file mode 100644
index 0000000..ea48388
--- /dev/null
+++ b/.bazelci/presubmit.yml
@@ -0,0 +1,69 @@
+---
+build_targets: &build_targets
+ - "//..."
+test_targets: &test_targets
+ - "//..."
+
+build_targets_bzlmod: &build_targets_bzlmod
+ - "//..."
+test_targets_bzlmod: &test_targets_bzlmod
+ - "//..."
+
+buildifier:
+ version: latest
+ # skylark-comment fails because links to Bazel's docs for
+ # `ProtoInfo` and `proto_common` contain `/skylark/`.
+ warnings: "-skylark-comment"
+
+tasks:
+ ubuntu2004:
+ build_targets: *build_targets
+ test_targets: *test_targets
+ macos:
+ build_targets: *build_targets
+ test_targets: *test_targets
+ windows:
+ build_targets: *build_targets
+ test_targets: *test_targets
+ ubuntu2004_head:
+ bazel: last_green
+ platform: ubuntu2004
+ build_targets: *build_targets
+ test_targets: *test_targets
+ macos_head:
+ bazel: last_green
+ platform: macos
+ build_targets: *build_targets
+ test_targets: *test_targets
+ windows_head:
+ bazel: last_green
+ platform: windows
+ build_targets: *build_targets
+ test_targets: *test_targets
+ ubuntu2004_bzlmod:
+ bazel: last_green
+ platform: ubuntu2004
+ build_flags:
+ - "--config=bzlmod"
+ build_targets: *build_targets_bzlmod
+ test_flags:
+ - "--config=bzlmod"
+ test_targets: *test_targets_bzlmod
+ macos_bzlmod:
+ bazel: last_green
+ platform: macos
+ build_flags:
+ - "--config=bzlmod"
+ build_targets: *build_targets_bzlmod
+ test_flags:
+ - "--config=bzlmod"
+ test_targets: *test_targets_bzlmod
+ windows_bzlmod:
+ bazel: last_green
+ platform: windows
+ build_flags:
+ - "--config=bzlmod"
+ build_targets: *build_targets_bzlmod
+ test_flags:
+ - "--config=bzlmod"
+ test_targets: *test_targets_bzlmod
diff --git a/.bazelrc b/.bazelrc
new file mode 100644
index 0000000..f1a8f3d
--- /dev/null
+++ b/.bazelrc
@@ -0,0 +1 @@
+build:bzlmod --enable_bzlmod
diff --git a/.bcr/README.md b/.bcr/README.md
new file mode 100644
index 0000000..706f926
--- /dev/null
+++ b/.bcr/README.md
@@ -0,0 +1,9 @@
+# Bazel Central Registry
+
+When the ruleset is released, we want it to be published to the
+Bazel Central Registry automatically:
+<https://registry.bazel.build>
+
+This folder contains configuration files to automate the publish step.
+See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
+for authoritative documentation about these files. \ No newline at end of file
diff --git a/.bcr/config.yml b/.bcr/config.yml
new file mode 100644
index 0000000..9828ad2
--- /dev/null
+++ b/.bcr/config.yml
@@ -0,0 +1,3 @@
+fixedReleaser:
+ login: alexeagle
+ email: alex@aspect.dev
diff --git a/.bcr/metadata.template.json b/.bcr/metadata.template.json
new file mode 100644
index 0000000..79772a7
--- /dev/null
+++ b/.bcr/metadata.template.json
@@ -0,0 +1,27 @@
+{
+ "homepage": "https://github.com/bazelbuild/rules_proto",
+ "maintainers": [
+ {
+ "github": "googleberg",
+ "name": "Jerry Berg"
+ },
+ {
+ "github": "zhangskz"
+ },
+ {
+ "email": "alex@aspect.dev",
+ "github": "alexeagle",
+ "name": "Alex Eagle"
+ },
+ {
+ "email": "sahin@aspect.dev",
+ "github": "thesayyn",
+ "name": "Şahin Yort"
+ }
+ ],
+ "versions": [],
+ "yanked_versions": {},
+ "repository": [
+ "github:bazelbuild/rules_proto"
+ ]
+}
diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml
new file mode 100644
index 0000000..f7bceee
--- /dev/null
+++ b/.bcr/presubmit.yml
@@ -0,0 +1,10 @@
+matrix:
+ platform: ["centos7", "debian10", "macos", "ubuntu2004", "windows"]
+ bazel: ['7.x', '6.x']
+tasks:
+ verify_build_targets:
+ name: "Verify build targets"
+ bazel: ${{ bazel }}
+ platform: ${{ platform }}
+ build_targets:
+ - "@rules_proto//proto/..."
diff --git a/.bcr/source.template.json b/.bcr/source.template.json
new file mode 100644
index 0000000..7fb5985
--- /dev/null
+++ b/.bcr/source.template.json
@@ -0,0 +1,5 @@
+{
+ "integrity": "**leave this alone**",
+ "strip_prefix": "{REPO}-{VERSION}",
+ "url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz"
+}
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..3194ddf
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,7 @@
+# In code review, collapse generated files
+docs/*.md linguist-generated=true
+
+# Configuration for 'git archive'
+# see https://git-scm.com/docs/git-archive/2.40.0#ATTRIBUTES
+# Omit folders that users don't need, making the distribution artifact smaller
+tests export-ignore
diff --git a/.github/workflows/ci.bazelrc b/.github/workflows/ci.bazelrc
new file mode 100644
index 0000000..3b4aad2
--- /dev/null
+++ b/.github/workflows/ci.bazelrc
@@ -0,0 +1,15 @@
+# This file contains Bazel settings to apply on CI only.
+# It is referenced with a --bazelrc option in the call to bazel in ci.yaml
+
+# Debug where options came from
+build --announce_rc
+# This directory is configured in GitHub actions to be persisted between runs.
+# We do not enable the repository cache to cache downloaded external artifacts
+# as these are generally faster to download again than to fetch them from the
+# GitHub actions cache.
+build --disk_cache=~/.cache/bazel
+# Don't rely on test logs being easily accessible from the test runner,
+# though it makes the log noisier.
+test --test_output=errors
+# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
+test --test_env=XDG_CACHE_HOME
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..43ea4de
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,18 @@
+# Automatically perform a release whenever a new "release-like" tag is pushed to the repo.
+name: Release
+
+on:
+ push:
+ tags:
+ # Detect tags that look like a release.
+ # Note that we don't use a "v" prefix to help anchor this pattern.
+ # This is purely a matter of preference.
+ - "*.*.*"
+
+jobs:
+ release:
+ # Re-use https://github.com/bazel-contrib/.github/blob/v5/.github/workflows/release_ruleset.yaml
+ uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v5
+ with:
+ prerelease: false
+ release_files: rules_proto-*.tar.gz \ No newline at end of file
diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh
new file mode 100755
index 0000000..01cbaf6
--- /dev/null
+++ b/.github/workflows/release_prep.sh
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+set -o errexit -o nounset -o pipefail
+
+# Set by GH actions, see
+# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
+readonly TAG=${GITHUB_REF_NAME}
+# The prefix is chosen to match what GitHub generates for source archives.
+# This guarantees that users can easily switch from a released artifact to a source archive
+# with minimal differences in their code (e.g. strip_prefix remains the same)
+readonly PREFIX="rules_proto-${TAG}"
+readonly ARCHIVE="${PREFIX}.tar.gz"
+
+# NB: configuration for 'git archive' is in /.gitattributes
+git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
+SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
+
+# The stdout of this program will be used as the top of the release notes for this release.
+cat << EOF
+## Using bzlmod with Bazel 6 or later:
+
+1. [Bazel 6] Add \`common --enable_bzlmod\` to \`.bazelrc\`.
+
+2. Add to your \`MODULE.bazel\` file:
+
+\`\`\`starlark
+bazel_dep(name = "rules_proto", version = "${TAG}")
+\`\`\`
+
+## Using WORKSPACE:
+
+\`\`\`starlark
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+http_archive(
+ name = "rules_proto",
+ sha256 = "${SHA}",
+ strip_prefix = "${PREFIX}",
+ url = "https://github.com/bazelbuild/rules_proto/releases/download/${TAG}/${ARCHIVE}",
+)
+
+load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
+rules_proto_dependencies()
+
+load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
+rules_proto_toolchains()
+\`\`\`
+EOF
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a6ef824
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/bazel-*
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..52c7cd0
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,12 @@
+# Optional local setup for a git pre-commit hook to automatically format/lint.
+# This avoids sending a red PR and having to find the buildifier output on the CI results page.
+# See https://pre-commit.com for more information on installing pre-commit.
+# See https://pre-commit.com/hooks.html for more hooks.
+
+repos:
+ # Check formatting and lint for starlark code
+ - repo: https://github.com/keith/pre-commit-buildifier
+ rev: 6.3.3
+ hooks:
+ - id: buildifier
+ - id: buildifier-lint
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..b77d9a7
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,13 @@
+# This the official list of authors for copyright purposes.
+#
+# Names should be added to this file as:
+# Name or Organization <email address>
+# The email address is not required for organizations.
+#
+# Please keep the lists sorted.
+
+# Organizations
+
+Google LLC
+
+# Individuals
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..e2c2f41
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,10 @@
+load("@rules_license//rules:license.bzl", "license")
+
+license(
+ name = "license",
+ package_name = "rules_proto",
+)
+
+licenses(["notice"])
+
+exports_files(["LICENSE"])
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 0000000..434bee5
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1 @@
+* @comius @bazelbuild/protobuf-team
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..1c897d0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# How to Contribute
+
+We'd love to accept your patches and contributions to this project. There are
+just a few small guidelines you need to follow.
+
+## Contributor License Agreement
+
+Contributions to this project must be accompanied by a Contributor License
+Agreement. You (or your employer) retain the copyright to your contribution;
+this simply gives us permission to use and redistribute your contributions as
+part of the project. Head over to <https://cla.developers.google.com/> to see
+your current agreements on file or to sign a new one.
+
+You generally only need to submit a CLA once, so if you've already submitted one
+(even if it was for a different project), you probably don't need to do it
+again.
+
+## Code reviews
+
+All submissions, including submissions by project members, require review. We
+use GitHub pull requests for this purpose. Consult
+[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
+information on using pull requests.
+
+## Community Guidelines
+
+This project follows [Google's Open Source Community
+Guidelines](https://opensource.google.com/conduct/).
+
+## Releasing
+
+To perform a release, simply tag the commit you wish to release, for example:
+
+```
+rules_proto$ git fetch
+rules_proto$ git tag 1.2.3 origin/main
+rules_proto$ git push origin 1.2.3
+``` \ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/MODULE.bazel b/MODULE.bazel
new file mode 100644
index 0000000..618f9ac
--- /dev/null
+++ b/MODULE.bazel
@@ -0,0 +1,19 @@
+"Bazel dependencies"
+
+module(
+ name = "rules_proto",
+ # Note: the publish-to-BCR app will patch this line to stamp the version being published.
+ version = "0.0.0",
+ compatibility_level = 1,
+)
+
+bazel_dep(name = "rules_license", version = "0.0.7")
+bazel_dep(name = "bazel_skylib", version = "1.3.0")
+bazel_dep(name = "bazel_features", version = "1.2.0")
+
+# Dependencies needed in tests
+bazel_dep(name = "stardoc", version = "0.5.6", dev_dependency = True, repo_name = "io_bazel_stardoc")
+bazel_dep(name = "rules_cc", version = "0.0.1", dev_dependency = True)
+bazel_dep(name = "googletest", version = "1.11.0", dev_dependency = True, repo_name = "com_google_googletest")
+bazel_dep(name = "protobuf", version = "23.1", dev_dependency = True, repo_name = "com_google_protobuf")
+bazel_dep(name = "platforms", version = "0.0.8", dev_dependency = True)
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
new file mode 100644
index 0000000..4369309
--- /dev/null
+++ b/MODULE.bazel.lock
@@ -0,0 +1,1591 @@
+{
+ "lockFileVersion": 3,
+ "moduleFileHash": "d75c4280d894f656a3d4464363dabcd953079702253fce25f07ee435ed41f635",
+ "flags": {
+ "cmdRegistries": [
+ "https://bcr.bazel.build/"
+ ],
+ "cmdModuleOverrides": {},
+ "allowedYankedVersions": [],
+ "envVarAllowedYankedVersions": "",
+ "ignoreDevDependency": false,
+ "directDependenciesMode": "WARNING",
+ "compatibilityMode": "ERROR"
+ },
+ "localOverrideHashes": {
+ "bazel_tools": "922ea6752dc9105de5af957f7a99a6933c0a6a712d23df6aad16a9c399f7e787"
+ },
+ "moduleDepGraph": {
+ "<root>": {
+ "name": "rules_proto",
+ "version": "0.0.0",
+ "key": "<root>",
+ "repoName": "rules_proto",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_license": "rules_license@0.0.7",
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "bazel_features": "bazel_features@1.2.0",
+ "io_bazel_stardoc": "stardoc@0.5.6",
+ "rules_cc": "rules_cc@0.0.9",
+ "com_google_googletest": "googletest@1.11.0",
+ "com_google_protobuf": "protobuf@21.7",
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ }
+ },
+ "rules_license@0.0.7": {
+ "name": "rules_license",
+ "version": "0.0.7",
+ "key": "rules_license@0.0.7",
+ "repoName": "rules_license",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_license~0.0.7",
+ "urls": [
+ "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz"
+ ],
+ "integrity": "sha256-RTHezLkTY5ww5cdRKgVNXYdWmNrrddjPkPKEN1/nw2A=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "bazel_skylib@1.3.0": {
+ "name": "bazel_skylib",
+ "version": "1.3.0",
+ "key": "bazel_skylib@1.3.0",
+ "repoName": "bazel_skylib",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "//toolchains/unittest:cmd_toolchain",
+ "//toolchains/unittest:bash_toolchain"
+ ],
+ "extensionUsages": [],
+ "deps": {
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "bazel_skylib~1.3.0",
+ "urls": [
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz"
+ ],
+ "integrity": "sha256-dNVE2W9KW7Yw1GXKi7z+Ix41lOWq5X4e2/F6brPKJQY=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "bazel_features@1.2.0": {
+ "name": "bazel_features",
+ "version": "1.2.0",
+ "key": "bazel_features@1.2.0",
+ "repoName": "bazel_features",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@bazel_features//private:extensions.bzl",
+ "extensionName": "version_extension",
+ "usingModule": "bazel_features@1.2.0",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/bazel_features/1.2.0/MODULE.bazel",
+ "line": 6,
+ "column": 24
+ },
+ "imports": {
+ "bazel_features_globals": "bazel_features_globals",
+ "bazel_features_version": "bazel_features_version"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "bazel_features~1.2.0",
+ "urls": [
+ "https://github.com/bazel-contrib/bazel_features/releases/download/v1.2.0/bazel_features-v1.2.0.tar.gz"
+ ],
+ "integrity": "sha256-uHicg8iT1+8wQdPyeVd0k2sn/2FwGnBd9S/UHW3b9pI=",
+ "strip_prefix": "bazel_features-1.2.0",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/bazel_features/1.2.0/patches/module_dot_bazel_version.patch": "sha256-B0rNFSA7VB65YY95ORkzTgsn21RkUwlAb1Xy2y2PyXA="
+ },
+ "remote_patch_strip": 1
+ }
+ }
+ },
+ "stardoc@0.5.6": {
+ "name": "stardoc",
+ "version": "0.5.6",
+ "key": "stardoc@0.5.6",
+ "repoName": "stardoc",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_java": "rules_java@7.1.0",
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "stardoc~0.5.6",
+ "urls": [
+ "https://github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz"
+ ],
+ "integrity": "sha256-37w2Sq7BQ99ebFL68fEWZ3WltECCQ/RF9EtmHP3DE08=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_cc@0.0.9": {
+ "name": "rules_cc",
+ "version": "0.0.9",
+ "key": "rules_cc@0.0.9",
+ "repoName": "rules_cc",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@local_config_cc_toolchains//:all"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl",
+ "extensionName": "cc_configure_extension",
+ "usingModule": "rules_cc@0.0.9",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel",
+ "line": 9,
+ "column": 29
+ },
+ "imports": {
+ "local_config_cc_toolchains": "local_config_cc_toolchains"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_cc~0.0.9",
+ "urls": [
+ "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"
+ ],
+ "integrity": "sha256-IDeHW5pEVtzkp50RKorohbvEqtlo5lh9ym5k86CQDN8=",
+ "strip_prefix": "rules_cc-0.0.9",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/rules_cc/0.0.9/patches/module_dot_bazel_version.patch": "sha256-mM+qzOI0SgAdaJBlWOSMwMPKpaA9b7R37Hj/tp5bb4g="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "googletest@1.11.0": {
+ "name": "googletest",
+ "version": "1.11.0",
+ "key": "googletest@1.11.0",
+ "repoName": "googletest",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "com_google_absl": "abseil-cpp@20211102.0",
+ "platforms": "platforms@0.0.8",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "googletest~1.11.0",
+ "urls": [
+ "https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz"
+ ],
+ "integrity": "sha256-tIcL8SH/d5W6INILzdhie44Ijy0dqymaAxwQNO3ck9U=",
+ "strip_prefix": "googletest-release-1.11.0",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/googletest/1.11.0/patches/module_dot_bazel.patch": "sha256-HuahEdI/n8KCI071sN3CEziX+7qP/Ec77IWayYunLP0="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "protobuf@21.7": {
+ "name": "protobuf",
+ "version": "21.7",
+ "key": "protobuf@21.7",
+ "repoName": "protobuf",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_jvm_external//:extensions.bzl",
+ "extensionName": "maven",
+ "usingModule": "protobuf@21.7",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel",
+ "line": 22,
+ "column": 22
+ },
+ "imports": {
+ "maven": "maven"
+ },
+ "devImports": [],
+ "tags": [
+ {
+ "tagName": "install",
+ "attributeValues": {
+ "name": "maven",
+ "artifacts": [
+ "com.google.code.findbugs:jsr305:3.0.2",
+ "com.google.code.gson:gson:2.8.9",
+ "com.google.errorprone:error_prone_annotations:2.3.2",
+ "com.google.j2objc:j2objc-annotations:1.3",
+ "com.google.guava:guava:31.1-jre",
+ "com.google.guava:guava-testlib:31.1-jre",
+ "com.google.truth:truth:1.1.2",
+ "junit:junit:4.13.2",
+ "org.mockito:mockito-core:4.3.1"
+ ]
+ },
+ "devDependency": false,
+ "location": {
+ "file": "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel",
+ "line": 24,
+ "column": 14
+ }
+ }
+ ],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_python": "rules_python@0.10.2",
+ "rules_cc": "rules_cc@0.0.9",
+ "rules_proto": "<root>",
+ "rules_java": "rules_java@7.1.0",
+ "rules_pkg": "rules_pkg@0.7.0",
+ "com_google_abseil": "abseil-cpp@20211102.0",
+ "zlib": "zlib@1.3",
+ "upb": "upb@0.0.0-20220923-a547704",
+ "rules_jvm_external": "rules_jvm_external@4.4.2",
+ "com_google_googletest": "googletest@1.11.0",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "protobuf~21.7",
+ "urls": [
+ "https://github.com/protocolbuffers/protobuf/releases/download/v21.7/protobuf-all-21.7.zip"
+ ],
+ "integrity": "sha256-VJOiH17T/FAuZv7GuUScBqVRztYwAvpIkDxA36jeeko=",
+ "strip_prefix": "protobuf-21.7",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_module_dot_bazel.patch": "sha256-q3V2+eq0v2XF0z8z+V+QF4cynD6JvHI1y3kI/+rzl5s=",
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_module_dot_bazel_for_examples.patch": "sha256-O7YP6s3lo/1opUiO0jqXYORNHdZ/2q3hjz1QGy8QdIU=",
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/relative_repo_names.patch": "sha256-RK9RjW8T5UJNG7flIrnFiNE9vKwWB+8uWWtJqXYT0w4=",
+ "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_missing_files.patch": "sha256-Hyne4DG2u5bXcWHNxNMirA2QFAe/2Cl8oMm1XJdkQIY="
+ },
+ "remote_patch_strip": 1
+ }
+ }
+ },
+ "platforms@0.0.8": {
+ "name": "platforms",
+ "version": "0.0.8",
+ "key": "platforms@0.0.8",
+ "repoName": "platforms",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "platforms",
+ "urls": [
+ "https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz"
+ ],
+ "integrity": "sha256-gVBAZgU4ns7LbaB8vLUJ1WN6OrmiS8abEQFTE2fYnXQ=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "bazel_tools@_": {
+ "name": "bazel_tools",
+ "version": "",
+ "key": "bazel_tools@_",
+ "repoName": "bazel_tools",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@local_config_cc_toolchains//:all",
+ "@local_config_sh//:local_sh_toolchain"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl",
+ "extensionName": "cc_configure_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 17,
+ "column": 29
+ },
+ "imports": {
+ "local_config_cc": "local_config_cc",
+ "local_config_cc_toolchains": "local_config_cc_toolchains"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/osx:xcode_configure.bzl",
+ "extensionName": "xcode_configure_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 21,
+ "column": 32
+ },
+ "imports": {
+ "local_config_xcode": "local_config_xcode"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@rules_java//java:extensions.bzl",
+ "extensionName": "toolchains",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 24,
+ "column": 32
+ },
+ "imports": {
+ "local_jdk": "local_jdk",
+ "remote_java_tools": "remote_java_tools",
+ "remote_java_tools_linux": "remote_java_tools_linux",
+ "remote_java_tools_windows": "remote_java_tools_windows",
+ "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64",
+ "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/sh:sh_configure.bzl",
+ "extensionName": "sh_configure_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 35,
+ "column": 39
+ },
+ "imports": {
+ "local_config_sh": "local_config_sh"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/test:extensions.bzl",
+ "extensionName": "remote_coverage_tools_extension",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 39,
+ "column": 48
+ },
+ "imports": {
+ "remote_coverage_tools": "remote_coverage_tools"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": "@bazel_tools//tools/android:android_extensions.bzl",
+ "extensionName": "remote_android_tools_extensions",
+ "usingModule": "bazel_tools@_",
+ "location": {
+ "file": "@@bazel_tools//:MODULE.bazel",
+ "line": 42,
+ "column": 42
+ },
+ "imports": {
+ "android_gmaven_r8": "android_gmaven_r8",
+ "android_tools": "android_tools"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "rules_cc": "rules_cc@0.0.9",
+ "rules_java": "rules_java@7.1.0",
+ "rules_license": "rules_license@0.0.7",
+ "rules_proto": "<root>",
+ "rules_python": "rules_python@0.10.2",
+ "platforms": "platforms@0.0.8",
+ "com_google_protobuf": "protobuf@21.7",
+ "zlib": "zlib@1.3",
+ "build_bazel_apple_support": "apple_support@1.5.0",
+ "local_config_platform": "local_config_platform@_"
+ }
+ },
+ "local_config_platform@_": {
+ "name": "local_config_platform",
+ "version": "",
+ "key": "local_config_platform@_",
+ "repoName": "local_config_platform",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_"
+ }
+ },
+ "rules_java@7.1.0": {
+ "name": "rules_java",
+ "version": "7.1.0",
+ "key": "rules_java@7.1.0",
+ "repoName": "rules_java",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "//toolchains:all",
+ "@local_jdk//:runtime_toolchain_definition",
+ "@local_jdk//:bootstrap_runtime_toolchain_definition",
+ "@remotejdk11_linux_toolchain_config_repo//:all",
+ "@remotejdk11_linux_aarch64_toolchain_config_repo//:all",
+ "@remotejdk11_linux_ppc64le_toolchain_config_repo//:all",
+ "@remotejdk11_linux_s390x_toolchain_config_repo//:all",
+ "@remotejdk11_macos_toolchain_config_repo//:all",
+ "@remotejdk11_macos_aarch64_toolchain_config_repo//:all",
+ "@remotejdk11_win_toolchain_config_repo//:all",
+ "@remotejdk11_win_arm64_toolchain_config_repo//:all",
+ "@remotejdk17_linux_toolchain_config_repo//:all",
+ "@remotejdk17_linux_aarch64_toolchain_config_repo//:all",
+ "@remotejdk17_linux_ppc64le_toolchain_config_repo//:all",
+ "@remotejdk17_linux_s390x_toolchain_config_repo//:all",
+ "@remotejdk17_macos_toolchain_config_repo//:all",
+ "@remotejdk17_macos_aarch64_toolchain_config_repo//:all",
+ "@remotejdk17_win_toolchain_config_repo//:all",
+ "@remotejdk17_win_arm64_toolchain_config_repo//:all",
+ "@remotejdk21_linux_toolchain_config_repo//:all",
+ "@remotejdk21_linux_aarch64_toolchain_config_repo//:all",
+ "@remotejdk21_macos_toolchain_config_repo//:all",
+ "@remotejdk21_macos_aarch64_toolchain_config_repo//:all",
+ "@remotejdk21_win_toolchain_config_repo//:all"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_java//java:extensions.bzl",
+ "extensionName": "toolchains",
+ "usingModule": "rules_java@7.1.0",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_java/7.1.0/MODULE.bazel",
+ "line": 19,
+ "column": 27
+ },
+ "imports": {
+ "remote_java_tools": "remote_java_tools",
+ "remote_java_tools_linux": "remote_java_tools_linux",
+ "remote_java_tools_windows": "remote_java_tools_windows",
+ "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64",
+ "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64",
+ "local_jdk": "local_jdk",
+ "remotejdk11_linux_toolchain_config_repo": "remotejdk11_linux_toolchain_config_repo",
+ "remotejdk11_linux_aarch64_toolchain_config_repo": "remotejdk11_linux_aarch64_toolchain_config_repo",
+ "remotejdk11_linux_ppc64le_toolchain_config_repo": "remotejdk11_linux_ppc64le_toolchain_config_repo",
+ "remotejdk11_linux_s390x_toolchain_config_repo": "remotejdk11_linux_s390x_toolchain_config_repo",
+ "remotejdk11_macos_toolchain_config_repo": "remotejdk11_macos_toolchain_config_repo",
+ "remotejdk11_macos_aarch64_toolchain_config_repo": "remotejdk11_macos_aarch64_toolchain_config_repo",
+ "remotejdk11_win_toolchain_config_repo": "remotejdk11_win_toolchain_config_repo",
+ "remotejdk11_win_arm64_toolchain_config_repo": "remotejdk11_win_arm64_toolchain_config_repo",
+ "remotejdk17_linux_toolchain_config_repo": "remotejdk17_linux_toolchain_config_repo",
+ "remotejdk17_linux_aarch64_toolchain_config_repo": "remotejdk17_linux_aarch64_toolchain_config_repo",
+ "remotejdk17_linux_ppc64le_toolchain_config_repo": "remotejdk17_linux_ppc64le_toolchain_config_repo",
+ "remotejdk17_linux_s390x_toolchain_config_repo": "remotejdk17_linux_s390x_toolchain_config_repo",
+ "remotejdk17_macos_toolchain_config_repo": "remotejdk17_macos_toolchain_config_repo",
+ "remotejdk17_macos_aarch64_toolchain_config_repo": "remotejdk17_macos_aarch64_toolchain_config_repo",
+ "remotejdk17_win_toolchain_config_repo": "remotejdk17_win_toolchain_config_repo",
+ "remotejdk17_win_arm64_toolchain_config_repo": "remotejdk17_win_arm64_toolchain_config_repo",
+ "remotejdk21_linux_toolchain_config_repo": "remotejdk21_linux_toolchain_config_repo",
+ "remotejdk21_linux_aarch64_toolchain_config_repo": "remotejdk21_linux_aarch64_toolchain_config_repo",
+ "remotejdk21_macos_toolchain_config_repo": "remotejdk21_macos_toolchain_config_repo",
+ "remotejdk21_macos_aarch64_toolchain_config_repo": "remotejdk21_macos_aarch64_toolchain_config_repo",
+ "remotejdk21_win_toolchain_config_repo": "remotejdk21_win_toolchain_config_repo"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "platforms": "platforms@0.0.8",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_proto": "<root>",
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0",
+ "urls": [
+ "https://github.com/bazelbuild/rules_java/releases/download/7.1.0/rules_java-7.1.0.tar.gz"
+ ],
+ "integrity": "sha256-o3pOX2OrgnFuXdau75iO2EYcegC46TYnImKJn1h81OE=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "abseil-cpp@20211102.0": {
+ "name": "abseil-cpp",
+ "version": "20211102.0",
+ "key": "abseil-cpp@20211102.0",
+ "repoName": "abseil-cpp",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_cc": "rules_cc@0.0.9",
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "abseil-cpp~20211102.0",
+ "urls": [
+ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz"
+ ],
+ "integrity": "sha256-3PcbnLqNwMqZQMSzFqDHlr6Pq0KwcLtrfKtitI8OZsQ=",
+ "strip_prefix": "abseil-cpp-20211102.0",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/patches/module_dot_bazel.patch": "sha256-4izqopgGCey4jVZzl/w3M2GVPNohjh2B5TmbThZNvPY="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_python@0.10.2": {
+ "name": "rules_python",
+ "version": "0.10.2",
+ "key": "rules_python@0.10.2",
+ "repoName": "rules_python",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@bazel_tools//tools/python:autodetecting_toolchain"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_python//python:extensions.bzl",
+ "extensionName": "pip_install",
+ "usingModule": "rules_python@0.10.2",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel",
+ "line": 7,
+ "column": 28
+ },
+ "imports": {
+ "pypi__click": "pypi__click",
+ "pypi__colorama": "pypi__colorama",
+ "pypi__installer": "pypi__installer",
+ "pypi__pep517": "pypi__pep517",
+ "pypi__pip": "pypi__pip",
+ "pypi__pip_tools": "pypi__pip_tools",
+ "pypi__setuptools": "pypi__setuptools",
+ "pypi__tomli": "pypi__tomli",
+ "pypi__wheel": "pypi__wheel"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_python~0.10.2",
+ "urls": [
+ "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.10.2.tar.gz"
+ ],
+ "integrity": "sha256-o6bpn0l74In4HsCCiC5AJGv9Q19S9OgvN+iUSbBFc/Y=",
+ "strip_prefix": "rules_python-0.10.2",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/rules_python/0.10.2/patches/module_dot_bazel.patch": "sha256-TScILAmXmmMtjJIwhLrgNZgqGPs6G3OAzXaLXLDNFrA="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_pkg@0.7.0": {
+ "name": "rules_pkg",
+ "version": "0.7.0",
+ "key": "rules_pkg@0.7.0",
+ "repoName": "rules_pkg",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "rules_python": "rules_python@0.10.2",
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_license": "rules_license@0.0.7",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_pkg~0.7.0",
+ "urls": [
+ "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz"
+ ],
+ "integrity": "sha256-iimOgydi7aGDBZfWT+fbWBeKqEzVkm121bdE1lWJQcI=",
+ "strip_prefix": "",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/rules_pkg/0.7.0/patches/module_dot_bazel.patch": "sha256-4OaEPZwYF6iC71ZTDg6MJ7LLqX7ZA0/kK4mT+4xKqiE="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "zlib@1.3": {
+ "name": "zlib",
+ "version": "1.3",
+ "key": "zlib@1.3",
+ "repoName": "zlib",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "platforms": "platforms@0.0.8",
+ "rules_cc": "rules_cc@0.0.9",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "zlib~1.3",
+ "urls": [
+ "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz"
+ ],
+ "integrity": "sha256-/wukwpIBPbwnUws6geH5qBPNOd4Byl4Pi/NVcC76WT4=",
+ "strip_prefix": "zlib-1.3",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/zlib/1.3/patches/add_build_file.patch": "sha256-Ei+FYaaOo7A3jTKunMEodTI0Uw5NXQyZEcboMC8JskY=",
+ "https://bcr.bazel.build/modules/zlib/1.3/patches/module_dot_bazel.patch": "sha256-fPWLM+2xaF/kuy+kZc1YTfW6hNjrkG400Ho7gckuyJk="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "upb@0.0.0-20220923-a547704": {
+ "name": "upb",
+ "version": "0.0.0-20220923-a547704",
+ "key": "upb@0.0.0-20220923-a547704",
+ "repoName": "upb",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "rules_proto": "<root>",
+ "com_google_protobuf": "protobuf@21.7",
+ "com_google_absl": "abseil-cpp@20211102.0",
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "upb~0.0.0-20220923-a547704",
+ "urls": [
+ "https://github.com/protocolbuffers/upb/archive/a5477045acaa34586420942098f5fecd3570f577.tar.gz"
+ ],
+ "integrity": "sha256-z39x6v+QskwaKLSWRan/A6mmwecTQpHOcJActj5zZLU=",
+ "strip_prefix": "upb-a5477045acaa34586420942098f5fecd3570f577",
+ "remote_patches": {
+ "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/patches/module_dot_bazel.patch": "sha256-wH4mNS6ZYy+8uC0HoAft/c7SDsq2Kxf+J8dUakXhaB0="
+ },
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "rules_jvm_external@4.4.2": {
+ "name": "rules_jvm_external",
+ "version": "4.4.2",
+ "key": "rules_jvm_external@4.4.2",
+ "repoName": "rules_jvm_external",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@rules_jvm_external//:non-module-deps.bzl",
+ "extensionName": "non_module_deps",
+ "usingModule": "rules_jvm_external@4.4.2",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel",
+ "line": 9,
+ "column": 32
+ },
+ "imports": {
+ "io_bazel_rules_kotlin": "io_bazel_rules_kotlin"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ },
+ {
+ "extensionBzlFile": ":extensions.bzl",
+ "extensionName": "maven",
+ "usingModule": "rules_jvm_external@4.4.2",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel",
+ "line": 16,
+ "column": 22
+ },
+ "imports": {
+ "rules_jvm_external_deps": "rules_jvm_external_deps"
+ },
+ "devImports": [],
+ "tags": [
+ {
+ "tagName": "install",
+ "attributeValues": {
+ "name": "rules_jvm_external_deps",
+ "artifacts": [
+ "com.google.cloud:google-cloud-core:1.93.10",
+ "com.google.cloud:google-cloud-storage:1.113.4",
+ "com.google.code.gson:gson:2.9.0",
+ "org.apache.maven:maven-artifact:3.8.6",
+ "software.amazon.awssdk:s3:2.17.183"
+ ],
+ "lock_file": "@rules_jvm_external//:rules_jvm_external_deps_install.json"
+ },
+ "devDependency": false,
+ "location": {
+ "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel",
+ "line": 18,
+ "column": 14
+ }
+ }
+ ],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "io_bazel_stardoc": "stardoc@0.5.6",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_jvm_external~4.4.2",
+ "urls": [
+ "https://github.com/bazelbuild/rules_jvm_external/archive/refs/tags/4.4.2.zip"
+ ],
+ "integrity": "sha256-c1YC9QgT6y6pPKP15DsZWb2AshO4NqB6YqKddXZwt3s=",
+ "strip_prefix": "rules_jvm_external-4.4.2",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ },
+ "apple_support@1.5.0": {
+ "name": "apple_support",
+ "version": "1.5.0",
+ "key": "apple_support@1.5.0",
+ "repoName": "build_bazel_apple_support",
+ "executionPlatformsToRegister": [],
+ "toolchainsToRegister": [
+ "@local_config_apple_cc_toolchains//:all"
+ ],
+ "extensionUsages": [
+ {
+ "extensionBzlFile": "@build_bazel_apple_support//crosstool:setup.bzl",
+ "extensionName": "apple_cc_configure_extension",
+ "usingModule": "apple_support@1.5.0",
+ "location": {
+ "file": "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel",
+ "line": 17,
+ "column": 35
+ },
+ "imports": {
+ "local_config_apple_cc": "local_config_apple_cc",
+ "local_config_apple_cc_toolchains": "local_config_apple_cc_toolchains"
+ },
+ "devImports": [],
+ "tags": [],
+ "hasDevUseExtension": false,
+ "hasNonDevUseExtension": true
+ }
+ ],
+ "deps": {
+ "bazel_skylib": "bazel_skylib@1.3.0",
+ "platforms": "platforms@0.0.8",
+ "bazel_tools": "bazel_tools@_",
+ "local_config_platform": "local_config_platform@_"
+ },
+ "repoSpec": {
+ "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "apple_support~1.5.0",
+ "urls": [
+ "https://github.com/bazelbuild/apple_support/releases/download/1.5.0/apple_support.1.5.0.tar.gz"
+ ],
+ "integrity": "sha256-miM41vja0yRPgj8txghKA+TQ+7J8qJLclw5okNW0gYQ=",
+ "strip_prefix": "",
+ "remote_patches": {},
+ "remote_patch_strip": 0
+ }
+ }
+ }
+ },
+ "moduleExtensions": {
+ "@@apple_support~1.5.0//crosstool:setup.bzl%apple_cc_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "pMLFCYaRPkgXPQ8vtuNkMfiHfPmRBy6QJfnid4sWfv0=",
+ "accumulatedFileDigests": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_apple_cc": {
+ "bzlFile": "@@apple_support~1.5.0//crosstool:setup.bzl",
+ "ruleClassName": "_apple_cc_autoconf",
+ "attributes": {
+ "name": "apple_support~1.5.0~apple_cc_configure_extension~local_config_apple_cc"
+ }
+ },
+ "local_config_apple_cc_toolchains": {
+ "bzlFile": "@@apple_support~1.5.0//crosstool:setup.bzl",
+ "ruleClassName": "_apple_cc_autoconf_toolchains",
+ "attributes": {
+ "name": "apple_support~1.5.0~apple_cc_configure_extension~local_config_apple_cc_toolchains"
+ }
+ }
+ }
+ }
+ },
+ "@@bazel_features~1.2.0//private:extensions.bzl%version_extension": {
+ "general": {
+ "bzlTransitiveDigest": "xm7Skm1Las5saxzFWt2hbS+e68BWi+MXyt6+lKIhjPA=",
+ "accumulatedFileDigests": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "bazel_features_version": {
+ "bzlFile": "@@bazel_features~1.2.0//private:version_repo.bzl",
+ "ruleClassName": "version_repo",
+ "attributes": {
+ "name": "bazel_features~1.2.0~version_extension~bazel_features_version"
+ }
+ },
+ "bazel_features_globals": {
+ "bzlFile": "@@bazel_features~1.2.0//private:globals_repo.bzl",
+ "ruleClassName": "globals_repo",
+ "attributes": {
+ "name": "bazel_features~1.2.0~version_extension~bazel_features_globals",
+ "globals": {
+ "RunEnvironmentInfo": "5.3.0",
+ "DefaultInfo": "0.0.1",
+ "__TestingOnly_NeverAvailable": "1000000000.0.0"
+ }
+ }
+ }
+ }
+ }
+ },
+ "@@bazel_tools//tools/cpp:cc_configure.bzl%cc_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "O9sf6ilKWU9Veed02jG9o2HM/xgV/UAyciuFBuxrFRY=",
+ "accumulatedFileDigests": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_cc": {
+ "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl",
+ "ruleClassName": "cc_autoconf",
+ "attributes": {
+ "name": "bazel_tools~cc_configure_extension~local_config_cc"
+ }
+ },
+ "local_config_cc_toolchains": {
+ "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl",
+ "ruleClassName": "cc_autoconf_toolchains",
+ "attributes": {
+ "name": "bazel_tools~cc_configure_extension~local_config_cc_toolchains"
+ }
+ }
+ }
+ }
+ },
+ "@@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "Qh2bWTU6QW6wkrd87qrU4YeY+SG37Nvw3A0PR4Y0L2Y=",
+ "accumulatedFileDigests": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_xcode": {
+ "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl",
+ "ruleClassName": "xcode_autoconf",
+ "attributes": {
+ "name": "bazel_tools~xcode_configure_extension~local_config_xcode",
+ "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m",
+ "remote_xcode": ""
+ }
+ }
+ }
+ }
+ },
+ "@@bazel_tools//tools/sh:sh_configure.bzl%sh_configure_extension": {
+ "general": {
+ "bzlTransitiveDigest": "hp4NgmNjEg5+xgvzfh6L83bt9/aiiWETuNpwNuF1MSU=",
+ "accumulatedFileDigests": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "local_config_sh": {
+ "bzlFile": "@@bazel_tools//tools/sh:sh_configure.bzl",
+ "ruleClassName": "sh_config",
+ "attributes": {
+ "name": "bazel_tools~sh_configure_extension~local_config_sh"
+ }
+ }
+ }
+ }
+ },
+ "@@rules_java~7.1.0//java:extensions.bzl%toolchains": {
+ "general": {
+ "bzlTransitiveDigest": "iUIRqCK7tkhvcDJCAfPPqSd06IHG0a8HQD0xeQyVAqw=",
+ "accumulatedFileDigests": {},
+ "envVariables": {},
+ "generatedRepoSpecs": {
+ "remotejdk21_linux_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_linux_s390x_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_s390x_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_s390x//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_s390x//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_macos_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk21_macos_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_aarch64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos_aarch64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_linux_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_aarch64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_aarch64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk21_macos_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_aarch64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n",
+ "sha256": "2a7a99a3ea263dbd8d32a67d1e6e363ba8b25c645c826f5e167a02bbafaff1fa",
+ "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-macosx_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_linux_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_macos_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_aarch64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "314b04568ec0ae9b36ba03c9cbd42adc9e1265f74678923b19297d66eb84dcca",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remote_java_tools_windows": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remote_java_tools_windows",
+ "sha256": "c5c70c214a350f12cbf52da8270fa43ba629b795f3dd328028a38f8f0d39c2a1",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_windows-v13.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_windows-v13.1.zip"
+ ]
+ }
+ },
+ "remotejdk11_win": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_win",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "43408193ce2fa0862819495b5ae8541085b95660153f2adcf91a52d3a1710e83",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-win_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip"
+ ]
+ }
+ },
+ "remotejdk11_win_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_win_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_linux_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_aarch64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "54174439f2b3fddd11f1048c397fe7bb45d4c9d66d452d6889b013d04d21c4de",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "b9482f2304a1a68a614dfacddcf29569a72f0fac32e6c74f83dc1b9a157b8340",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_linux_s390x_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_s390x_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_s390x//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_s390x//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_linux_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_macos": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_macos",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "bcaab11cfe586fae7583c6d9d311c64384354fb2638eb9a012eca4c3f1a1d9fd",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_win_arm64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_win_arm64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "b8a28e6e767d90acf793ea6f5bed0bb595ba0ba5ebdf8b99f395266161e53ec2",
+ "strip_prefix": "jdk-11.0.13+8",
+ "urls": [
+ "https://mirror.bazel.build/aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-aarch64.zip"
+ ]
+ }
+ },
+ "remotejdk17_macos": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_macos",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "640453e8afe8ffe0fb4dceb4535fb50db9c283c64665eebb0ba68b19e65f4b1f",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_macos": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_macos",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n",
+ "sha256": "9639b87db586d0c89f7a9892ae47f421e442c64b97baebdff31788fbe23265bd",
+ "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-macosx_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_macos_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_macos_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_aarch64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos_aarch64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_win": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_win",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "192f2afca57701de6ec496234f7e45d971bf623ff66b8ee4a5c81582054e5637",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip"
+ ]
+ }
+ },
+ "remotejdk11_macos_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_aarch64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos_aarch64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_linux_ppc64le_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_ppc64le_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_ppc64le//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_ppc64le//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk21_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_linux",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n",
+ "sha256": "0c0eadfbdc47a7ca64aeab51b9c061f71b6e4d25d2d87674512e9b6387e9e3a6",
+ "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-linux_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz"
+ ]
+ }
+ },
+ "remote_java_tools_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remote_java_tools_linux",
+ "sha256": "d134da9b04c9023fb6e56a5d4bffccee73f7bc9572ddc4e747778dacccd7a5a7",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_linux-v13.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_linux-v13.1.zip"
+ ]
+ }
+ },
+ "remotejdk21_win": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_win",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n",
+ "sha256": "e9959d500a0d9a7694ac243baf657761479da132f0f94720cbffd092150bd802",
+ "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-win_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-win_x64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-win_x64.zip"
+ ]
+ }
+ },
+ "remotejdk21_linux_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_aarch64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n",
+ "sha256": "1fb64b8036c5d463d8ab59af06bf5b6b006811e6012e3b0eb6bccf57f1c55835",
+ "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-linux_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_linux_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_aarch64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_aarch64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_linux_s390x": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_s390x",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "a58fc0361966af0a5d5a31a2d8a208e3c9bb0f54f345596fd80b99ea9a39788b",
+ "strip_prefix": "jdk-11.0.15+10",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_linux_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_aarch64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "6531cef61e416d5a7b691555c8cf2bdff689201b8a001ff45ab6740062b44313",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_win_arm64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_win_arm64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win_arm64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win_arm64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_linux": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "a34b404f87a08a61148b38e1416d837189e1df7a040d949e743633daf4695a3c",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_x64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_macos_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_linux_ppc64le_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_ppc64le_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_ppc64le//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_ppc64le//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk17_win_arm64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_win_arm64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "6802c99eae0d788e21f52d03cab2e2b3bf42bc334ca03cbf19f71eb70ee19f85",
+ "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip",
+ "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip"
+ ]
+ }
+ },
+ "remote_java_tools_darwin_arm64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remote_java_tools_darwin_arm64",
+ "sha256": "dab5bb87ec43e980faea6e1cec14bafb217b8e2f5346f53aa784fd715929a930",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_darwin_arm64-v13.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_darwin_arm64-v13.1.zip"
+ ]
+ }
+ },
+ "remotejdk17_linux_ppc64le": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_ppc64le",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "00a4c07603d0218cd678461b5b3b7e25b3253102da4022d31fc35907f21a2efd",
+ "strip_prefix": "jdk-17.0.8.1+1",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_linux_aarch64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_aarch64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux_aarch64//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_win_arm64_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_win_arm64_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win_arm64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win_arm64//:jdk\",\n)\n"
+ }
+ },
+ "local_jdk": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:local_java_repository.bzl",
+ "ruleClassName": "_local_java_repository_rule",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~local_jdk",
+ "java_home": "",
+ "version": "",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = {RUNTIME_VERSION},\n)\n"
+ }
+ },
+ "remote_java_tools_darwin_x86_64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remote_java_tools_darwin_x86_64",
+ "sha256": "0db40d8505a2b65ef0ed46e4256757807db8162f7acff16225be57c1d5726dbc",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_darwin_x86_64-v13.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_darwin_x86_64-v13.1.zip"
+ ]
+ }
+ },
+ "remote_java_tools": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remote_java_tools",
+ "sha256": "286bdbbd66e616fc4ed3f90101418729a73baa7e8c23a98ffbef558f74c0ad14",
+ "urls": [
+ "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools-v13.1.zip",
+ "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools-v13.1.zip"
+ ]
+ }
+ },
+ "remotejdk17_linux_s390x": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_s390x",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n",
+ "sha256": "ffacba69c6843d7ca70d572489d6cc7ab7ae52c60f0852cedf4cf0d248b6fc37",
+ "strip_prefix": "jdk-17.0.8.1+1",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz",
+ "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz"
+ ]
+ }
+ },
+ "remotejdk17_win_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk17_win_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win//:jdk\",\n)\n"
+ }
+ },
+ "remotejdk11_linux_ppc64le": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_ppc64le",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "a8fba686f6eb8ae1d1a9566821dbd5a85a1108b96ad857fdbac5c1e4649fc56f",
+ "strip_prefix": "jdk-11.0.15+10",
+ "urls": [
+ "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz",
+ "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz"
+ ]
+ }
+ },
+ "remotejdk11_macos_aarch64": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_archive",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_aarch64",
+ "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n",
+ "sha256": "7632bc29f8a4b7d492b93f3bc75a7b61630894db85d136456035ab2a24d38885",
+ "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_aarch64",
+ "urls": [
+ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz",
+ "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz"
+ ]
+ }
+ },
+ "remotejdk21_win_toolchain_config_repo": {
+ "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl",
+ "ruleClassName": "_toolchain_config",
+ "attributes": {
+ "name": "rules_java~7.1.0~toolchains~remotejdk21_win_toolchain_config_repo",
+ "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_win//:jdk\",\n)\n"
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cf25dae
--- /dev/null
+++ b/README.md
@@ -0,0 +1,59 @@
+# Protobuf Rules for [Bazel](https://bazel.build)
+
+* Postsubmit [![Build status](https://badge.buildkite.com/26d40f574d6f6026928bc271780782e5f168fe7e3595ea6d79.svg)](https://buildkite.com/bazel/rules-proto)
+
+This repository contains a Starlark implementation of `proto_library` and related "base layer" rules in Bazel.
+It does **not** provide rules for any specific languages. These are typically expected to be provided in the ruleset for the language.
+
+For a high-level overview of using Protocol Buffers and gRPC with Bazel, see
+<https://bazel-contrib.github.io/SIG-rules-authors/proto-grpc.html>.
+
+For the list of Proto rules, see the Bazel
+[documentation](https://docs.bazel.build/versions/master/be/overview.html).
+
+## Roadmap
+
+As of September 2023, this repo is mostly empty and contains stubs for `proto_library`, `ProtoInfo` and other proto toolchain support rules.
+
+This will change soon, around the time Bazel 7 is released (in Oct/Nov 2023), because the stubs will be replaced with actual implementations.
+We plan to remove the native implementations in Bazel 8, at which point rules_proto will be the only way to build Protobuf rules.
+
+As such it's recommended to use this repository now, so that the removal of implementations from Bazel 8 does not cause you problems.
+
+## Getting Started
+
+To get started with `rules_proto`, add the `WORKSPACE` file snippet from the
+[latest release](https://github.com/bazelbuild/rules_proto/releases).
+
+Then, in your `BUILD` files, import and use the rules:
+
+```starlark
+load("@rules_proto//proto:defs.bzl", "proto_library")
+proto_library(
+ ...
+)
+```
+
+If you're migrating from the native proto rules to `rules_proto`, you can use
+the following [buildifier](https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md)
+command to automate the changes to your `BUILD` and `.bzl` files:
+
+```bash
+buildifier --lint=fix --warnings=native-proto <path/to/BUILD>
+```
+
+## Contributing
+
+Bazel and `rules_proto` are the work of many contributors.
+We appreciate your help!
+
+To contribute, please read the contribution guidelines:
+[CONTRIBUTING.md](https://github.com/bazelbuild/rules_proto/blob/master/CONTRIBUTING.md).
+
+Note that the `rules_proto` use the GitHub issue tracker for bug reports and
+feature requests only.
+
+For asking questions see:
+
+* [rules_proto mailing list](https://groups.google.com/forum/#!forum/proto-bazel-discuss)
+* Slack channel `#proto` on [slack.bazel.build](https://slack.bazel.build)
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 0000000..2f65076
--- /dev/null
+++ b/WORKSPACE
@@ -0,0 +1,29 @@
+workspace(name = "rules_proto")
+
+load("//proto:repositories.bzl", "rules_proto_dependencies")
+
+rules_proto_dependencies()
+
+load("//proto:toolchains.bzl", "rules_proto_toolchains")
+
+rules_proto_toolchains()
+
+# Dev-only dependencies. USERS SHOULD NOT INSTALL THESE!
+load(":dev_deps.bzl", "rules_proto_dev_deps")
+
+rules_proto_dev_deps()
+
+load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
+
+bazel_skylib_workspace()
+
+load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
+
+protobuf_deps()
+
+load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
+
+rbe_preconfig(
+ name = "buildkite_config",
+ toolchain = "ubuntu1804-bazel-java11",
+)
diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/WORKSPACE.bzlmod
diff --git a/dev_deps.bzl b/dev_deps.bzl
new file mode 100644
index 0000000..a9fb212
--- /dev/null
+++ b/dev_deps.bzl
@@ -0,0 +1,67 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""dev dependencies needed to develop rules_proto"""
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+def rules_proto_dev_deps():
+ """development only dependencies for rules_proto"""
+ http_archive(
+ name = "io_bazel_stardoc",
+ sha256 = "dfbc364aaec143df5e6c52faf1f1166775a5b4408243f445f44b661cfdc3134f",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz",
+ "https://github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz",
+ ],
+ )
+
+ http_archive(
+ name = "rules_cc",
+ sha256 = "4aeb102efbcfad509857d7cb9c5456731e8ce566bfbf2960286a2ec236796cc3",
+ strip_prefix = "rules_cc-2f8c04c04462ab83c545ab14c0da68c3b4c96191",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/2f8c04c04462ab83c545ab14c0da68c3b4c96191.tar.gz",
+ "https://github.com/bazelbuild/rules_cc/archive/2f8c04c04462ab83c545ab14c0da68c3b4c96191.tar.gz",
+ ],
+ )
+
+ http_archive(
+ name = "com_google_googletest",
+ sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2",
+ strip_prefix = "googletest-release-1.12.1",
+ urls = [
+ "https://mirror.bazel.build/github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
+ "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
+ ],
+ )
+
+ http_archive(
+ name = "bazelci_rules",
+ sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
+ strip_prefix = "bazelci_rules-1.0.0",
+ urls = [
+ "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
+ ],
+ )
+
+ http_archive(
+ name = "com_google_protobuf",
+ sha256 = "dc167b7d23ec0d6e4a3d4eae1798de6c8d162e69fa136d39753aaeb7a6e1289d",
+ strip_prefix = "protobuf-23.1",
+ urls = [
+ "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz",
+ "https://github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz",
+ ],
+ )
diff --git a/docs/BUILD b/docs/BUILD
new file mode 100644
index 0000000..9349d4a
--- /dev/null
+++ b/docs/BUILD
@@ -0,0 +1,12 @@
+load(":stardoc_with_diff_test.bzl", "stardoc_with_diff_test", "update_docs")
+
+stardoc_with_diff_test(
+ name = "defs",
+ bzl_library_target = "//proto:defs",
+ out_label = "//docs:defs.md",
+)
+
+update_docs(
+ name = "update",
+ docs_folder = "docs",
+)
diff --git a/docs/defs.md b/docs/defs.md
new file mode 100644
index 0000000..2f5dc92
--- /dev/null
+++ b/docs/defs.md
@@ -0,0 +1,95 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Starlark rules for building protocol buffers.
+
+<a id="proto_descriptor_set"></a>
+
+## proto_descriptor_set
+
+<pre>
+proto_descriptor_set(<a href="#proto_descriptor_set-name">name</a>, <a href="#proto_descriptor_set-deps">deps</a>)
+</pre>
+
+Collects all `FileDescriptorSet`s from `deps` and combines them into a single
+`FileDescriptorSet` containing all the `FileDescriptorProto`.
+
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="proto_descriptor_set-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="proto_descriptor_set-deps"></a>deps | Sequence of <code>ProtoInfo</code>s to collect <code>FileDescriptorSet</code>s from. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
+
+
+<a id="proto_lang_toolchain"></a>
+
+## proto_lang_toolchain
+
+<pre>
+proto_lang_toolchain(<a href="#proto_lang_toolchain-name">name</a>, <a href="#proto_lang_toolchain-toolchain_type">toolchain_type</a>, <a href="#proto_lang_toolchain-exec_compatible_with">exec_compatible_with</a>, <a href="#proto_lang_toolchain-target_compatible_with">target_compatible_with</a>, <a href="#proto_lang_toolchain-attrs">attrs</a>)
+</pre>
+
+Creates a proto_lang_toolchain and corresponding toolchain target.
+
+Toolchain target is only created when toolchain_type is set.
+
+https://docs.bazel.build/versions/master/be/protocol-buffer.html#proto_lang_toolchain
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="proto_lang_toolchain-name"></a>name | name of the toolchain | none |
+| <a id="proto_lang_toolchain-toolchain_type"></a>toolchain_type | The toolchain type | <code>None</code> |
+| <a id="proto_lang_toolchain-exec_compatible_with"></a>exec_compatible_with | ([constraints]) List of constraints the prebuild binaries is compatible with. | <code>[]</code> |
+| <a id="proto_lang_toolchain-target_compatible_with"></a>target_compatible_with | ([constraints]) List of constraints the target libraries are compatible with. | <code>[]</code> |
+| <a id="proto_lang_toolchain-attrs"></a>attrs | Rule attributes | none |
+
+
+<a id="proto_library"></a>
+
+## proto_library
+
+<pre>
+proto_library(<a href="#proto_library-attrs">attrs</a>)
+</pre>
+
+Bazel proto_library rule.
+
+https://docs.bazel.build/versions/master/be/protocol-buffer.html#proto_library
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="proto_library-attrs"></a>attrs | Rule attributes | none |
+
+
+<a id="proto_toolchain"></a>
+
+## proto_toolchain
+
+<pre>
+proto_toolchain(<a href="#proto_toolchain-name">name</a>, <a href="#proto_toolchain-proto_compiler">proto_compiler</a>, <a href="#proto_toolchain-exec_compatible_with">exec_compatible_with</a>)
+</pre>
+
+Creates a proto_toolchain and toolchain target for proto_library.
+
+Toolchain target is suffixed with "_toolchain".
+
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :------------- | :------------- | :------------- |
+| <a id="proto_toolchain-name"></a>name | name of the toolchain | none |
+| <a id="proto_toolchain-proto_compiler"></a>proto_compiler | (Label) of either proto compiler sources or prebuild binaries | none |
+| <a id="proto_toolchain-exec_compatible_with"></a>exec_compatible_with | ([constraints]) List of constraints the prebuild binary is compatible with. | <code>[]</code> |
+
+
diff --git a/docs/stardoc_with_diff_test.bzl b/docs/stardoc_with_diff_test.bzl
new file mode 100644
index 0000000..a8542f3
--- /dev/null
+++ b/docs/stardoc_with_diff_test.bzl
@@ -0,0 +1,111 @@
+# Copyright 2022 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Helpers for keeping stardoc documentation up-to-date.
+
+These are currently a private API in bazel-skylib.
+See discussion:
+https://github.com/bazelbuild/bazel-skylib/pull/321#issuecomment-1081166216
+
+If you need a similar feature, you can consider using a similar rule
+available from a third-party:
+https://github.com/aspect-build/bazel-lib/blob/main/docs/docs.md
+"""
+
+load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
+load("@bazel_skylib//rules:write_file.bzl", "write_file")
+load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
+
+def stardoc_with_diff_test(
+ name,
+ bzl_library_target,
+ out_label):
+ """Creates a stardoc target coupled with a `diff_test` for a given `bzl_library`.
+
+ This is helpful for minimizing boilerplate in repos with lots of stardoc targets.
+
+ Args:
+ name: the stardoc target name
+ bzl_library_target: the label of the `bzl_library` target to generate documentation for
+ out_label: the label of the output MD file
+ """
+ out_file = out_label.replace("//", "").replace(":", "/")
+
+ # Generate MD from .bzl
+ stardoc(
+ name = name,
+ out = out_file.replace(".md", "-docgen.md"),
+ input = bzl_library_target + ".bzl",
+ deps = [bzl_library_target],
+ )
+
+ # Ensure that the generated MD has been updated in the local source tree
+ diff_test(
+ name = out_file.replace("/", "_").replace(".md", "-difftest"),
+ failure_message = "Please run \"bazel run //docs:update\"",
+ # Source file
+ file1 = out_label,
+ # Output from stardoc rule above
+ file2 = out_file.replace(".md", "-docgen.md"),
+ tags = ["no_windows"],
+ )
+
+def update_docs(
+ name = "update",
+ docs_folder = "docs"):
+ """Creates a `sh_binary` target which copies over generated doc files to the local source tree.
+
+ This is to be used in tandem with `stardoc_with_diff_test()` to produce a convenient workflow
+ for generating, testing, and updating all doc files as follows:
+
+ ``` bash
+ bazel build //{docs_folder}/... && bazel test //{docs_folder}/... && bazel run //{docs_folder}:update
+ ```
+
+ eg.
+
+ ``` bash
+ bazel build //docs/... && bazel test //docs/... && bazel run //docs:update
+ ```
+
+ The `update_docs()` invocation must come after/below any `stardoc_with_diff_test()` invocations
+ in the BUILD file.
+
+ Args:
+ name: the name of the `sh_binary` target
+ docs_folder: the name of the folder containing the doc files in the local source tree
+ """
+ content = ["#!/usr/bin/env bash", "cd ${BUILD_WORKSPACE_DIRECTORY}"]
+ data = []
+ for r in native.existing_rules().values():
+ if r["kind"] == "stardoc":
+ doc_gen = r["out"]
+ if doc_gen.startswith(":"):
+ doc_gen = doc_gen[1:]
+ doc_dest = doc_gen.replace("-docgen.md", ".md")
+ data.append(doc_gen)
+ content.append("cp -fv bazel-bin/{0}/{1} {2}".format(docs_folder, doc_gen, doc_dest))
+
+ update_script = name + ".sh"
+ write_file(
+ name = "gen_" + name,
+ out = update_script,
+ content = content,
+ )
+
+ native.sh_binary(
+ name = name,
+ srcs = [update_script],
+ data = data,
+ )
diff --git a/proto/BUILD b/proto/BUILD
new file mode 100644
index 0000000..e858d94
--- /dev/null
+++ b/proto/BUILD
@@ -0,0 +1,34 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+exports_files(
+ glob(["*.bzl"]),
+ visibility = ["//docs:__pkg__"],
+)
+
+bzl_library(
+ name = "defs",
+ srcs = [
+ "defs.bzl",
+ "proto_descriptor_set.bzl",
+ "proto_library.bzl",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//proto/private:native",
+ "//proto/private/rules:proto_descriptor_set",
+ "//proto/toolchains:proto_lang_toolchain",
+ "//proto/toolchains:proto_toolchain",
+ ],
+)
+
+bzl_library(
+ name = "repositories",
+ srcs = ["repositories.bzl"],
+ visibility = ["//visibility:public"],
+)
+
+# Toolchain type provided by proto_toolchain rule and used by proto_library
+toolchain_type(
+ name = "toolchain_type",
+ visibility = ["//visibility:public"],
+)
diff --git a/proto/README.md b/proto/README.md
new file mode 100644
index 0000000..5c2822d
--- /dev/null
+++ b/proto/README.md
@@ -0,0 +1,6 @@
+Unless explicitly stated otherwise, everything in this folder and all subfolders
+is considered to be an implementation detail and may change at any time without
+prior notice.
+
+Exceptions from this rule:
+ - All symbols exported in `//proto:defs.bzl` and `//proto:repositories.bzl`. \ No newline at end of file
diff --git a/proto/defs.bzl b/proto/defs.bzl
new file mode 100644
index 0000000..c330f81
--- /dev/null
+++ b/proto/defs.bzl
@@ -0,0 +1,34 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Starlark rules for building protocol buffers."""
+
+load("//proto:proto_descriptor_set.bzl", _proto_descriptor_set = "proto_descriptor_set")
+load("//proto:proto_library.bzl", _proto_library = "proto_library")
+load("//proto/modules:proto_common.bzl", _proto_common = "proto_common")
+load("//proto/modules:proto_info.bzl", _ProtoInfo = "ProtoInfo")
+load("//proto/toolchains:proto_lang_toolchain.bzl", _proto_lang_toolchain = "proto_lang_toolchain")
+load("//proto/toolchains:proto_toolchain.bzl", _proto_toolchain = "proto_toolchain")
+
+# Rules
+proto_library = _proto_library
+proto_descriptor_set = _proto_descriptor_set
+
+# Toolchain rules
+proto_toolchain = _proto_toolchain
+proto_lang_toolchain = _proto_lang_toolchain
+
+# Modules
+proto_common = _proto_common
+ProtoInfo = _ProtoInfo
diff --git a/proto/modules/BUILD b/proto/modules/BUILD
new file mode 100644
index 0000000..ac2edb0
--- /dev/null
+++ b/proto/modules/BUILD
@@ -0,0 +1,11 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+bzl_library(
+ name = "proto_common",
+ srcs = [
+ "proto_common.bzl",
+ "proto_info.bzl",
+ "proto_lang_toolchain_info.bzl",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/proto/modules/proto_common.bzl b/proto/modules/proto_common.bzl
new file mode 100644
index 0000000..826dea1
--- /dev/null
+++ b/proto/modules/proto_common.bzl
@@ -0,0 +1,53 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Utilities for protocol buffers.
+#
+# https://docs.bazel.build/versions/master/skylark/lib/proto_common.html
+"""proto_common module"""
+
+load("//proto/modules:proto_lang_toolchain_info.bzl", "ProtoLangToolchainInfo")
+load("//proto/private:native.bzl", "native_proto_common")
+
+proto_common = native_proto_common
+
+def _incompatible_toolchains_enabled():
+ return getattr(proto_common, "INCOMPATIBLE_ENABLE_PROTO_TOOLCHAIN_RESOLUTION", False)
+
+def _find_toolchain(ctx, legacy_attr, toolchain_type):
+ if _incompatible_toolchains_enabled():
+ toolchain = ctx.toolchains[toolchain_type]
+ if not toolchain:
+ fail("No toolchains registered for '%s'." % toolchain_type)
+ return toolchain.proto
+ else:
+ return getattr(ctx.attr, legacy_attr)[ProtoLangToolchainInfo]
+
+def _use_toolchain(toolchain_type):
+ if _incompatible_toolchains_enabled():
+ return [config_common.toolchain_type(toolchain_type, mandatory = False)]
+ else:
+ return []
+
+def _if_legacy_toolchain(legacy_attr_dict):
+ if _incompatible_toolchains_enabled():
+ return {}
+ else:
+ return legacy_attr_dict
+
+toolchains = struct(
+ use_toolchain = _use_toolchain,
+ find_toolchain = _find_toolchain,
+ if_legacy_toolchain = _if_legacy_toolchain,
+)
diff --git a/proto/modules/proto_info.bzl b/proto/modules/proto_info.bzl
new file mode 100644
index 0000000..ead2be7
--- /dev/null
+++ b/proto/modules/proto_info.bzl
@@ -0,0 +1,18 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""ProtoInfo"""
+
+load("//proto/private:native.bzl", "NativeProtoInfo")
+
+ProtoInfo = NativeProtoInfo
diff --git a/proto/modules/proto_lang_toolchain_info.bzl b/proto/modules/proto_lang_toolchain_info.bzl
new file mode 100644
index 0000000..20eac87
--- /dev/null
+++ b/proto/modules/proto_lang_toolchain_info.bzl
@@ -0,0 +1,18 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""ProtoLangToolchainInfo"""
+
+load("//proto/private:native.bzl", "native_proto_common")
+
+ProtoLangToolchainInfo = native_proto_common.ProtoLangToolchainInfo
diff --git a/proto/private/BUILD b/proto/private/BUILD
new file mode 100644
index 0000000..92ef5fd
--- /dev/null
+++ b/proto/private/BUILD
@@ -0,0 +1,7 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+bzl_library(
+ name = "native",
+ srcs = ["native.bzl"],
+ visibility = ["//proto:__subpackages__"],
+)
diff --git a/proto/private/native.bzl b/proto/private/native.bzl
new file mode 100644
index 0000000..3185eae
--- /dev/null
+++ b/proto/private/native.bzl
@@ -0,0 +1,28 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Redefine native symbols with a new name as a workaround for
+# exporting them in `//proto:defs.bzl` with their original name.
+#
+# While we cannot force users to load these symbol due to the lack of a
+# allowlisting mechanism, we can still export them and tell users to
+# load it to make a future migration to pure Starlark easier.
+
+"""Lovely workaround to be able to expose native constants pretending to be Starlark."""
+
+# buildifier: disable=native-proto
+NativeProtoInfo = ProtoInfo
+
+# buildifier: disable=native-proto
+native_proto_common = proto_common_do_not_use
diff --git a/proto/private/rules/BUILD b/proto/private/rules/BUILD
new file mode 100644
index 0000000..61ec702
--- /dev/null
+++ b/proto/private/rules/BUILD
@@ -0,0 +1,26 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+bzl_library(
+ name = "proto_descriptor_set",
+ srcs = [
+ "proto_descriptor_set.bzl",
+ ],
+ visibility = [
+ "//proto:__subpackages__",
+ ],
+ deps = [
+ "//proto/private:native",
+ ],
+)
+
+bzl_library(
+ name = "proto_toolchain_bzl",
+ srcs = [
+ "proto_toolchain.bzl",
+ "proto_toolchain_rule.bzl",
+ "@bazel_features//:bzl_files",
+ ],
+ visibility = [
+ "//proto:__subpackages__",
+ ],
+)
diff --git a/proto/private/rules/proto_descriptor_set.bzl b/proto/private/rules/proto_descriptor_set.bzl
new file mode 100644
index 0000000..1b184fa
--- /dev/null
+++ b/proto/private/rules/proto_descriptor_set.bzl
@@ -0,0 +1,70 @@
+# Copyright 2020 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""A rule for generating a `FileDescriptorSet` with all transitive dependencies.
+
+This module contains the definition of `proto_descriptor_set`, a rule that
+collects all `FileDescriptorSet`s from its transitive dependencies and generates
+a single `FileDescriptorSet` containing all the `FileDescriptorProto` from them.
+"""
+
+load("//proto/private:native.bzl", ProtoInfo = "NativeProtoInfo")
+
+def _proto_descriptor_set_impl(ctx):
+ args = ctx.actions.args()
+
+ output = ctx.actions.declare_file("{}.pb".format(ctx.attr.name))
+ args.add(output)
+
+ descriptor_sets = depset(
+ transitive = [dep[ProtoInfo].transitive_descriptor_sets for dep in ctx.attr.deps],
+ )
+ args.add_all(descriptor_sets)
+
+ ctx.actions.run(
+ executable = ctx.executable._file_concat,
+ mnemonic = "ConcatFileDescriptorSet",
+ inputs = descriptor_sets,
+ outputs = [output],
+ arguments = [args],
+ )
+
+ return [
+ DefaultInfo(
+ files = depset([output]),
+ runfiles = ctx.runfiles(files = [output]),
+ ),
+ ]
+
+proto_descriptor_set = rule(
+ implementation = _proto_descriptor_set_impl,
+ attrs = {
+ "deps": attr.label_list(
+ mandatory = False,
+ providers = [ProtoInfo],
+ doc = """
+Sequence of `ProtoInfo`s to collect `FileDescriptorSet`s from.
+""".strip(),
+ ),
+ "_file_concat": attr.label(
+ default = "//tools/file_concat",
+ executable = True,
+ cfg = "exec",
+ ),
+ },
+ doc = """
+Collects all `FileDescriptorSet`s from `deps` and combines them into a single
+`FileDescriptorSet` containing all the `FileDescriptorProto`.
+""".strip(),
+)
diff --git a/proto/private/rules/proto_toolchain.bzl b/proto/private/rules/proto_toolchain.bzl
new file mode 100644
index 0000000..a091b80
--- /dev/null
+++ b/proto/private/rules/proto_toolchain.bzl
@@ -0,0 +1,40 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Macro wrapping the proto_toolchain implementation.
+
+The macro additionally creates toolchain target when toolchain_type is given.
+"""
+
+load(":proto_toolchain_rule.bzl", _proto_toolchain_rule = "proto_toolchain")
+
+def proto_toolchain(*, name, proto_compiler, exec_compatible_with = []):
+ """Creates a proto_toolchain and toolchain target for proto_library.
+
+ Toolchain target is suffixed with "_toolchain".
+
+ Args:
+ name: name of the toolchain
+ proto_compiler: (Label) of either proto compiler sources or prebuild binaries
+ exec_compatible_with: ([constraints]) List of constraints the prebuild binary is compatible with.
+ """
+ _proto_toolchain_rule(name = name, proto_compiler = proto_compiler)
+
+ native.toolchain(
+ name = name + "_toolchain",
+ toolchain_type = "//proto:toolchain_type",
+ exec_compatible_with = exec_compatible_with,
+ target_compatible_with = [],
+ toolchain = name,
+ )
diff --git a/proto/private/rules/proto_toolchain_rule.bzl b/proto/private/rules/proto_toolchain_rule.bzl
new file mode 100644
index 0000000..7443085
--- /dev/null
+++ b/proto/private/rules/proto_toolchain_rule.bzl
@@ -0,0 +1,71 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""A Starlark implementation of the proto_toolchain rule."""
+
+load("@bazel_features//:features.bzl", "bazel_features")
+load("//proto/modules:proto_common.bzl", "proto_common")
+load("//proto/modules:proto_lang_toolchain_info.bzl", "ProtoLangToolchainInfo")
+
+def _impl(ctx):
+ kwargs = {}
+ if getattr(proto_common, "INCOMPATIBLE_PASS_TOOLCHAIN_TYPE", False):
+ kwargs["toolchain_type"] = "//proto:toolchain_type"
+
+ # allowlist_different_package is only available after Bazel versions > 6.4.0
+ # therefore needs to be set conditionally. We are using bazel_features for this
+ # but there's no specific feature flag for `allowlist_different_package` so we'll
+ # just use module_extension_has_os_arch_dependent which checks if Bazel version >= 6.4.0
+ # See: https://github.com/protocolbuffers/protobuf/pull/14590#discussion_r1398778415
+ # See: https://github.com/bazel-contrib/bazel_features/blob/443861571a389ddc16d17690ab8e46ee87b4ea57/features.bzl#L25C5-L25C43
+ if bazel_features.external_deps.module_extension_has_os_arch_dependent:
+ kwargs["allowlist_different_package"] = None
+
+ return [
+ DefaultInfo(
+ files = depset(),
+ runfiles = ctx.runfiles(),
+ ),
+ platform_common.ToolchainInfo(
+ proto = ProtoLangToolchainInfo(
+ out_replacement_format_flag = ctx.attr.command_line,
+ output_files = ctx.attr.output_files,
+ plugin = None,
+ runtime = None,
+ proto_compiler = ctx.attr.proto_compiler.files_to_run,
+ protoc_opts = ctx.fragments.proto.experimental_protoc_opts,
+ progress_message = ctx.attr.progress_message,
+ mnemonic = ctx.attr.mnemonic,
+ **kwargs
+ ),
+ ),
+ ]
+
+proto_toolchain = rule(
+ _impl,
+ attrs =
+ {
+ "progress_message": attr.string(default = "Generating Descriptor Set proto_library %{label}"),
+ "mnemonic": attr.string(default = "GenProtoDescriptorSet"),
+ "command_line": attr.string(default = "--descriptor_set_out=%s"),
+ "output_files": attr.string(values = ["single", "multiple", "legacy"], default = "single"),
+ "proto_compiler": attr.label(
+ cfg = "exec",
+ executable = True,
+ allow_files = True, # Used by mocks in tests. Consider fixing tests and removing it.
+ ),
+ },
+ provides = [platform_common.ToolchainInfo],
+ fragments = ["proto"],
+)
diff --git a/proto/proto_descriptor_set.bzl b/proto/proto_descriptor_set.bzl
new file mode 100644
index 0000000..c8358c6
--- /dev/null
+++ b/proto/proto_descriptor_set.bzl
@@ -0,0 +1,18 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""proto_descriptor_set rule"""
+
+load("//proto/private/rules:proto_descriptor_set.bzl", _proto_descriptor_set = "proto_descriptor_set")
+
+proto_descriptor_set = _proto_descriptor_set
diff --git a/proto/proto_lang_toolchain.bzl b/proto/proto_lang_toolchain.bzl
new file mode 100644
index 0000000..f390e97
--- /dev/null
+++ b/proto/proto_lang_toolchain.bzl
@@ -0,0 +1,20 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""proto_lang_toolchain rule"""
+
+load("//proto/toolchains:proto_lang_toolchain.bzl", _proto_lang_toolchain = "proto_lang_toolchain")
+
+# deprecated: load proto_lang_toolchain from toolchain package
+
+proto_lang_toolchain = _proto_lang_toolchain
diff --git a/proto/proto_library.bzl b/proto/proto_library.bzl
new file mode 100644
index 0000000..f3d8eb0
--- /dev/null
+++ b/proto/proto_library.bzl
@@ -0,0 +1,35 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""proto_library rule"""
+
+_MIGRATION_TAG = "__PROTO_RULES_MIGRATION_DO_NOT_USE_WILL_BREAK__"
+
+def _add_migration_tag(attrs):
+ if "tags" in attrs and attrs["tags"] != None:
+ attrs["tags"] = attrs["tags"] + [_MIGRATION_TAG]
+ else:
+ attrs["tags"] = [_MIGRATION_TAG]
+ return attrs
+
+def proto_library(**attrs):
+ """Bazel proto_library rule.
+
+ https://docs.bazel.build/versions/master/be/protocol-buffer.html#proto_library
+
+ Args:
+ **attrs: Rule attributes
+ """
+
+ # buildifier: disable=native-proto
+ native.proto_library(**_add_migration_tag(attrs))
diff --git a/proto/proto_toolchain.bzl b/proto/proto_toolchain.bzl
new file mode 100644
index 0000000..c61d8ec
--- /dev/null
+++ b/proto/proto_toolchain.bzl
@@ -0,0 +1,21 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Export for proto_toolchain"""
+
+load("//proto/private/rules:proto_toolchain.bzl", _proto_toolchain_macro = "proto_toolchain")
+
+# deprecated: load proto_toolchain from toolchain package
+
+proto_toolchain = _proto_toolchain_macro
diff --git a/proto/repositories.bzl b/proto/repositories.bzl
new file mode 100644
index 0000000..94abe21
--- /dev/null
+++ b/proto/repositories.bzl
@@ -0,0 +1,49 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Dependencies required to use rules_proto."""
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
+
+def rules_proto_dependencies():
+ """An utility method to load all dependencies of `rules_proto`.
+
+ Loads the remote repositories used by default in Bazel.
+ """
+ maybe(
+ http_archive,
+ name = "bazel_skylib",
+ sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
+ urls = [
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
+ ],
+ )
+ maybe(
+ http_archive,
+ name = "rules_license",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz",
+ "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz",
+ ],
+ sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360",
+ )
+
+ maybe(
+ http_archive,
+ name = "bazel_features",
+ sha256 = "b8789c83c893d7ef3041d3f2795774936b27ff61701a705df52fd41d6ddbf692",
+ strip_prefix = "bazel_features-1.2.0",
+ url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.2.0/bazel_features-v1.2.0.tar.gz",
+ )
diff --git a/proto/toolchains.bzl b/proto/toolchains.bzl
new file mode 100644
index 0000000..d162d4a
--- /dev/null
+++ b/proto/toolchains.bzl
@@ -0,0 +1,21 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Toolchains required to use rules_proto."""
+
+def rules_proto_toolchains():
+ """An utility method to load all Protobuf toolchains."""
+
+ # Nothing to do here (yet).
+ pass
diff --git a/proto/toolchains/BUILD b/proto/toolchains/BUILD
new file mode 100644
index 0000000..ec63c8a
--- /dev/null
+++ b/proto/toolchains/BUILD
@@ -0,0 +1,23 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+bzl_library(
+ name = "proto_lang_toolchain",
+ srcs = [
+ "proto_lang_toolchain.bzl",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//proto/modules:proto_common",
+ ],
+)
+
+bzl_library(
+ name = "proto_toolchain",
+ srcs = [
+ "proto_toolchain.bzl",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//proto/private/rules:proto_toolchain_bzl",
+ ],
+)
diff --git a/proto/toolchains/proto_lang_toolchain.bzl b/proto/toolchains/proto_lang_toolchain.bzl
new file mode 100644
index 0000000..690c11a
--- /dev/null
+++ b/proto/toolchains/proto_lang_toolchain.bzl
@@ -0,0 +1,47 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""proto_lang_toolchain rule"""
+
+load("//proto/modules:proto_common.bzl", "proto_common")
+
+def proto_lang_toolchain(*, name, toolchain_type = None, exec_compatible_with = [], target_compatible_with = [], **attrs):
+ """Creates a proto_lang_toolchain and corresponding toolchain target.
+
+ Toolchain target is only created when toolchain_type is set.
+
+ https://docs.bazel.build/versions/master/be/protocol-buffer.html#proto_lang_toolchain
+
+ Args:
+
+ name: name of the toolchain
+ toolchain_type: The toolchain type
+ exec_compatible_with: ([constraints]) List of constraints the prebuild binaries is compatible with.
+ target_compatible_with: ([constraints]) List of constraints the target libraries are compatible with.
+ **attrs: Rule attributes
+ """
+
+ if getattr(proto_common, "INCOMPATIBLE_PASS_TOOLCHAIN_TYPE", False):
+ attrs["toolchain_type"] = toolchain_type
+
+ # buildifier: disable=native-proto
+ native.proto_lang_toolchain(name = name, **attrs)
+
+ if toolchain_type:
+ native.toolchain(
+ name = name + "_toolchain",
+ toolchain_type = toolchain_type,
+ exec_compatible_with = exec_compatible_with,
+ target_compatible_with = target_compatible_with,
+ toolchain = name,
+ )
diff --git a/proto/toolchains/proto_toolchain.bzl b/proto/toolchains/proto_toolchain.bzl
new file mode 100644
index 0000000..e1a853c
--- /dev/null
+++ b/proto/toolchains/proto_toolchain.bzl
@@ -0,0 +1,19 @@
+# Copyright 2023 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Export for proto_toolchain"""
+
+load("//proto/private/rules:proto_toolchain.bzl", _proto_toolchain_macro = "proto_toolchain")
+
+proto_toolchain = _proto_toolchain_macro
diff --git a/tests/BUILD b/tests/BUILD
new file mode 100644
index 0000000..9ef193d
--- /dev/null
+++ b/tests/BUILD
@@ -0,0 +1,22 @@
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+load("//proto:defs.bzl", "proto_library")
+load("//proto/modules:proto_common.bzl", "proto_common")
+
+config_setting(
+ name = "incompatible_enable_proto_toolchain_resolution",
+ flag_values = {
+ ":incompatible_enable_proto_toolchain_resolution_flag": "true",
+ },
+)
+
+bool_flag(
+ name = "incompatible_enable_proto_toolchain_resolution_flag",
+ build_setting_default = getattr(proto_common, "INCOMPATIBLE_ENABLE_PROTO_TOOLCHAIN_RESOLUTION", False),
+)
+
+proto_library(
+ name = "empty_proto",
+ srcs = [
+ "empty.proto",
+ ],
+)
diff --git a/tests/empty.proto b/tests/empty.proto
new file mode 100644
index 0000000..b35cd86
--- /dev/null
+++ b/tests/empty.proto
@@ -0,0 +1,17 @@
+// Copyright 2019 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package rules_proto.tests;
diff --git a/tests/load_from_macro/BUILD b/tests/load_from_macro/BUILD
new file mode 100644
index 0000000..0c881f1
--- /dev/null
+++ b/tests/load_from_macro/BUILD
@@ -0,0 +1,29 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load("//proto:defs.bzl", "proto_library")
+load(":tags.bzl", "TAGS")
+
+proto_library(
+ name = "foo",
+ srcs = ["foo.proto"],
+ tags = TAGS,
+)
+
+bzl_library(
+ name = "tags",
+ srcs = ["tags.bzl"],
+)
diff --git a/tests/load_from_macro/foo.proto b/tests/load_from_macro/foo.proto
new file mode 100644
index 0000000..b35cd86
--- /dev/null
+++ b/tests/load_from_macro/foo.proto
@@ -0,0 +1,17 @@
+// Copyright 2019 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package rules_proto.tests;
diff --git a/tests/load_from_macro/tags.bzl b/tests/load_from_macro/tags.bzl
new file mode 100644
index 0000000..aa604c3
--- /dev/null
+++ b/tests/load_from_macro/tags.bzl
@@ -0,0 +1,17 @@
+# Copyright 2019 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""
+Example tags defined in a separate file.
+"""
+TAGS = ["first_tag", "second_tag"]
diff --git a/tests/proto_common/BUILD.bazel b/tests/proto_common/BUILD.bazel
new file mode 100644
index 0000000..82a7ecd
--- /dev/null
+++ b/tests/proto_common/BUILD.bazel
@@ -0,0 +1,3 @@
+load(":toolchains.bzl", "unittest_toolchains")
+
+unittest_toolchains()
diff --git a/tests/proto_common/toolchains.bzl b/tests/proto_common/toolchains.bzl
new file mode 100644
index 0000000..769424d
--- /dev/null
+++ b/tests/proto_common/toolchains.bzl
@@ -0,0 +1,65 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"unit tests for proto_common.toolchains"
+
+load("//proto/modules:proto_common.bzl", "toolchains")
+load("@bazel_skylib//lib:partial.bzl", "partial")
+load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
+
+def _test_toolchains_without_incompatible_flag(ctx):
+ env = unittest.begin(ctx)
+
+ asserts.equals(env, {}, toolchains.if_legacy_toolchain({}))
+ asserts.equals(env, None, toolchains.if_legacy_toolchain(None))
+ asserts.equals(env, False, toolchains.if_legacy_toolchain(False))
+
+ return unittest.end(env)
+
+toolchains_without_incompatible_flags_test = unittest.make(_test_toolchains_without_incompatible_flag)
+
+def _test_toolchains_with_incompatible_flag(ctx):
+ env = unittest.begin(ctx)
+
+ asserts.equals(env, {}, toolchains.if_legacy_toolchain({}))
+ asserts.equals(env, {}, toolchains.if_legacy_toolchain(None))
+ asserts.equals(env, {}, toolchains.if_legacy_toolchain(False))
+ toolchain = toolchains.use_toolchain("//nonexistent:toolchain_type")
+ asserts.equals(env, 1, len(toolchain))
+ asserts.equals(env, False, toolchain[0].mandatory)
+ asserts.equals(env, str(Label("//nonexistent:toolchain_type")), str(toolchain[0].toolchain_type))
+
+ return unittest.end(env)
+
+toolchains_with_incompatible_flag_test = unittest.make(_test_toolchains_with_incompatible_flag)
+
+# buildifier: disable=unnamed-macro
+def unittest_toolchains():
+ unittest.suite(
+ "test_toolchains",
+ partial.make(
+ toolchains_without_incompatible_flags_test,
+ target_compatible_with = select({
+ "//tests:incompatible_enable_proto_toolchain_resolution": ["@platforms//:incompatible"],
+ "//conditions:default": [],
+ }),
+ ),
+ partial.make(
+ toolchains_with_incompatible_flag_test,
+ target_compatible_with = select({
+ "//tests:incompatible_enable_proto_toolchain_resolution": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ ),
+ )
diff --git a/tests/rules/proto_descriptor_set/BUILD b/tests/rules/proto_descriptor_set/BUILD
new file mode 100644
index 0000000..69dee08
--- /dev/null
+++ b/tests/rules/proto_descriptor_set/BUILD
@@ -0,0 +1,49 @@
+load("@rules_cc//cc:defs.bzl", "cc_test")
+load("//proto:defs.bzl", "proto_descriptor_set", "proto_library")
+
+proto_library(
+ name = "empty_proto_library",
+)
+
+proto_descriptor_set(
+ name = "no_protos",
+ deps = [
+ ":empty_proto_library",
+ ],
+)
+
+proto_descriptor_set(
+ name = "well_known_protos",
+ deps = [
+ "@com_google_protobuf//:any_proto",
+ "@com_google_protobuf//:api_proto",
+ "@com_google_protobuf//:compiler_plugin_proto",
+ "@com_google_protobuf//:descriptor_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:empty_proto",
+ "@com_google_protobuf//:field_mask_proto",
+ "@com_google_protobuf//:source_context_proto",
+ "@com_google_protobuf//:struct_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ "@com_google_protobuf//:type_proto",
+ "@com_google_protobuf//:wrappers_proto",
+ ],
+)
+
+cc_test(
+ name = "proto_descriptor_set_test",
+ srcs = [
+ "proto_descriptor_set_test.cc",
+ ],
+ data = [
+ ":no_protos",
+ ":well_known_protos",
+ ],
+ deps = [
+ "//tests/utils:workspace_constants",
+ "@bazel_tools//tools/cpp/runfiles",
+ "@com_google_googletest//:gtest",
+ "@com_google_googletest//:gtest_main",
+ "@com_google_protobuf//:protobuf",
+ ],
+)
diff --git a/tests/rules/proto_descriptor_set/proto_descriptor_set_test.cc b/tests/rules/proto_descriptor_set/proto_descriptor_set_test.cc
new file mode 100644
index 0000000..4c9ae0b
--- /dev/null
+++ b/tests/rules/proto_descriptor_set/proto_descriptor_set_test.cc
@@ -0,0 +1,105 @@
+// Copyright 2020 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <algorithm>
+#include <fstream>
+#include <memory>
+#include <set>
+#include <string>
+#include <vector>
+
+#include "tools/cpp/runfiles/runfiles.h"
+#include "google/protobuf/descriptor.pb.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "tests/utils/workspace_constants.h"
+
+using bazel::tools::cpp::runfiles::Runfiles;
+using google::protobuf::FileDescriptorProto;
+using google::protobuf::FileDescriptorSet;
+
+namespace rulesproto {
+namespace {
+
+std::string GetRlocation(const std::string& file) {
+ static std::unique_ptr<Runfiles> runfiles(Runfiles::CreateForTest());
+ std::string path =
+ runfiles->Rlocation(rulesproto::kWorkspaceRlocation + file);
+ std::ifstream input(path, std::ifstream::binary);
+ if (!input) {
+ path = runfiles->Rlocation(rulesproto::kWorkspaceRlocationBzlmod + file);
+ }
+ return path;
+}
+
+template <typename T, typename K>
+bool Contains(const T& container, const K& key) {
+ return container.find(key) != container.end();
+}
+
+std::vector<std::string> ReadFileDescriptorSet(const std::string& path) {
+ std::ifstream input(path, std::ifstream::binary);
+ EXPECT_TRUE(input) << "Could not open " << path;
+
+ FileDescriptorSet file_descriptor_set;
+ EXPECT_TRUE(file_descriptor_set.ParseFromIstream(&input));
+
+ std::set<std::string> unordered_proto_files;
+ for (FileDescriptorProto file_descriptor : file_descriptor_set.file()) {
+ EXPECT_FALSE(Contains(unordered_proto_files, file_descriptor.name()))
+ << "Already saw " << file_descriptor.name();
+ unordered_proto_files.insert(file_descriptor.name());
+ }
+
+ std::vector<std::string> proto_files(unordered_proto_files.begin(),
+ unordered_proto_files.end());
+ std::sort(proto_files.begin(), proto_files.end());
+ return proto_files;
+}
+
+void AssertFileDescriptorSetContains(
+ const std::string& path,
+ const std::vector<std::string>& expected_proto_files) {
+ std::vector<std::string> actual_proto_files =
+ ReadFileDescriptorSet(GetRlocation(path));
+ EXPECT_THAT(actual_proto_files,
+ ::testing::IsSupersetOf(expected_proto_files));
+}
+
+} // namespace
+
+TEST(ProtoDescriptorSetTest, NoProtos) {
+ AssertFileDescriptorSetContains(
+ "tests/rules/proto_descriptor_set/no_protos.pb", {});
+}
+
+TEST(ProtoDescriptorSetTest, WellKnownProtos) {
+ AssertFileDescriptorSetContains(
+ "tests/rules/proto_descriptor_set/well_known_protos.pb",
+ {
+ "google/protobuf/any.proto",
+ "google/protobuf/api.proto",
+ "google/protobuf/descriptor.proto",
+ "google/protobuf/duration.proto",
+ "google/protobuf/empty.proto",
+ "google/protobuf/field_mask.proto",
+ "google/protobuf/source_context.proto",
+ "google/protobuf/struct.proto",
+ "google/protobuf/timestamp.proto",
+ "google/protobuf/type.proto",
+ "google/protobuf/wrappers.proto",
+ });
+}
+
+} // namespace rulesproto
diff --git a/tests/utils/BUILD b/tests/utils/BUILD
new file mode 100644
index 0000000..a39fbe6
--- /dev/null
+++ b/tests/utils/BUILD
@@ -0,0 +1,12 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
+cc_library(
+ name = "workspace_constants",
+ testonly = True,
+ hdrs = [
+ "workspace_constants.h",
+ ],
+ visibility = [
+ "//tests:__subpackages__",
+ ],
+)
diff --git a/tests/utils/workspace_constants.h b/tests/utils/workspace_constants.h
new file mode 100644
index 0000000..890ca60
--- /dev/null
+++ b/tests/utils/workspace_constants.h
@@ -0,0 +1,27 @@
+// Copyright 2020 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Contains WORKSPACE-related constants (e.g. the rlocation prefix).
+//
+// This file exists so that users that prefer to vendor all their dependencies
+// can create their own (private) version of this file that defines values that
+// make sense for their workspace instead of, e.g., relying on fragile Copybara
+// transformations.
+
+namespace rulesproto {
+
+constexpr char kWorkspaceRlocation[] = "rules_proto/";
+constexpr char kWorkspaceRlocationBzlmod[] = "_main/";
+
+} // namespace rulesproto
diff --git a/tools/file_concat/BUILD b/tools/file_concat/BUILD
new file mode 100644
index 0000000..be649fe
--- /dev/null
+++ b/tools/file_concat/BUILD
@@ -0,0 +1,9 @@
+load("@rules_cc//cc:defs.bzl", "cc_binary")
+
+cc_binary(
+ name = "file_concat",
+ srcs = [
+ "main.cc",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/tools/file_concat/main.cc b/tools/file_concat/main.cc
new file mode 100644
index 0000000..7f79e42
--- /dev/null
+++ b/tools/file_concat/main.cc
@@ -0,0 +1,65 @@
+// Copyright 2020 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <fstream>
+#include <iostream>
+#include <string>
+
+namespace {
+
+constexpr size_t kBufferSize = 4096; // 4kB
+
+// Return codes.
+constexpr int kOk = 0;
+constexpr int kUsageError = 1;
+constexpr int kIOError = 2;
+
+} // namespace
+
+int main(int argc, const char* argv[]) {
+ if (argc < 2) {
+ std::cout << "Usage: " << argv[0] << " <output> <inputs...>" << std::endl;
+ return kUsageError;
+ }
+
+ std::string output_path(argv[1]);
+ std::ofstream output(output_path, std::ofstream::binary);
+ if (!output) {
+ std::cerr << "Could not open output file " << output_path << std::endl;
+ return kIOError;
+ }
+
+ for (int i = 2; i < argc; i++) {
+ std::string input_path(argv[i]);
+ std::ifstream input(input_path, std::ifstream::binary);
+ if (!input) {
+ std::cerr << "Could not open input file " << output_path << std::endl;
+ return kIOError;
+ }
+
+ char buffer[kBufferSize];
+ while (input) {
+ if (!input.read(buffer, kBufferSize) && !input.eof()) {
+ std::cerr << "Error reading from " << input_path << std::endl;
+ return kIOError;
+ }
+ if (!output.write(buffer, input.gcount())) {
+ std::cerr << "Error writing to " << output_path << std::endl;
+ return kIOError;
+ }
+ }
+ }
+
+ return kOk;
+}