-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protobuf_extra_deps.bzl for loading dependencies necessary for ex…
…ternal repositories in protobuf_deps.bzl. This is needed for `rules_java` which requires additional loads for Bazel 8. This provides a single entrypoint for extra dependencies so we can add these moving forward without breaking users, and is similar to https://github.com/grpc/grpc/blob/master/bazel/grpc_extra_deps.bzl. Non-bzlmod users should make sure to set the following in their WORKSPACE file: ``` http_archive( name = "protobuf", strip_prefix = "protobuf-VERSION", sha256 = ..., url = ..., ) load("@protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() load("@protobuf//:protobuf_extra_deps.bzl", "protobuf_extra_deps") protobuf_extra_deps(); ``` PiperOrigin-RevId: 700810708
- Loading branch information
1 parent
37cc68f
commit d59a9e1
Showing
5 changed files
with
107 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""Loads the dependencies necessary for the external repositories defined in protobuf_deps.bzl. | ||
The consumers should use the following WORKSPACE snippet, which loads dependencies | ||
and sets up the repositories protobuf needs: | ||
``` | ||
http_archive( | ||
name = "com_google_protobuf", | ||
strip_prefix = "protobuf-VERSION", | ||
sha256 = ..., | ||
url = ..., | ||
) | ||
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") | ||
protobuf_deps() | ||
load("@com_google_protobuf//:protobuf_extra_deps.bzl", "protobuf_extra_deps") | ||
protobuf_extra_deps(); | ||
``` | ||
""" | ||
|
||
load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") | ||
|
||
def protobuf_extra_deps(): | ||
"""Loads extra dependencies needed for the external repositories defined in protobuf_deps.bzl.""" | ||
|
||
rules_java_dependencies() | ||
|
||
rules_java_toolchains() |