Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 1 | workspace(name = "com_google_protobuf_examples") |
| 2 | |
Adam Cozzette | e03c0d2 | 2018-12-11 15:57:26 -0800 | [diff] [blame] | 3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 4 | |
Protobuf Team Bot | 21d75f8 | 2024-04-05 07:45:26 -0700 | [diff] [blame] | 5 | # This protobuf repository is required for proto_library rule. |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 6 | # It provides the protocol compiler binary (i.e., protoc). |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 7 | # |
| 8 | # We declare it as local_repository so we can test changes |
| 9 | # before they get merged. You'll want to use the following instead: |
| 10 | # |
| 11 | # http_archive( |
Protobuf Team Bot | c820dd0 | 2024-11-11 20:44:32 -0800 | [diff] [blame] | 12 | # name = "com_google_protobuf", |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 13 | # sha256 = "c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126", |
| 14 | # strip_prefix = "protobuf-3.21.3", |
| 15 | # urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.3.tar.gz"], |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 16 | # ) |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 17 | |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 18 | local_repository( |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 19 | name = "com_google_protobuf", |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 20 | path = "..", |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 21 | ) |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 22 | |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 23 | # Similar to com_google_protobuf but for Java lite. If you are building |
Brian Wignall | a104dff | 2020-01-08 13:18:20 -0500 | [diff] [blame] | 24 | # for Android, the lite version should be preferred because it has a much |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 25 | # smaller code size. |
Rafi Kamal | e6c5a3b | 2019-11-27 11:10:45 -0800 | [diff] [blame] | 26 | local_repository( |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 27 | name = "com_google_protobuf_javalite", |
Rafi Kamal | e6c5a3b | 2019-11-27 11:10:45 -0800 | [diff] [blame] | 28 | path = "..", |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 29 | ) |
Feng Xiao | 1a7ce04 | 2018-07-03 11:00:15 -0700 | [diff] [blame] | 30 | |
Alex Eagle | 71e4061 | 2024-03-28 08:24:50 -0700 | [diff] [blame] | 31 | # Needed because protobuf_deps brings rules_python 0.26.0 which is broken: |
| 32 | # https://github.com/bazelbuild/rules_python/issues/1543 |
| 33 | http_archive( |
| 34 | name = "rules_python", |
| 35 | sha256 = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036", |
| 36 | strip_prefix = "rules_python-0.25.0", |
| 37 | url = "https://github.com/bazelbuild/rules_python/releases/download/0.25.0/rules_python-0.25.0.tar.gz", |
| 38 | ) |
| 39 | |
Protobuf Team Bot | c820dd0 | 2024-11-11 20:44:32 -0800 | [diff] [blame] | 40 | load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") |
Adam Cozzette | e03c0d2 | 2018-12-11 15:57:26 -0800 | [diff] [blame] | 41 | |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 42 | protobuf_deps() |
Protobuf Team Bot | c820dd0 | 2024-11-11 20:44:32 -0800 | [diff] [blame] | 43 | |
| 44 | http_archive( |
| 45 | name = "rules_java", |
| 46 | sha256 = "9b9614f8a7f7b7ed93cb7975d227ece30fe7daed2c0a76f03a5ee37f69e437de", |
| 47 | urls = [ |
| 48 | "https://github.com/bazelbuild/rules_java/releases/download/8.3.2/rules_java-8.3.2.tar.gz", |
| 49 | ], |
| 50 | ) |
| 51 | |
| 52 | load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") |
| 53 | |
| 54 | rules_java_dependencies() |
| 55 | |
| 56 | rules_java_toolchains() |