blob: 53b7d4156943234026e4b84fa5e5922e08ad33c2 [file] [log] [blame]
Yannic Bonenbergerbf0c69e2019-07-26 13:14:19 +02001workspace(name = "com_google_protobuf_examples")
2
Adam Cozzettee03c0d22018-12-11 15:57:26 -08003load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4
Protobuf Team Bot21d75f82024-04-05 07:45:26 -07005# This protobuf repository is required for proto_library rule.
Feng Xiao74bf45f2017-09-08 15:44:09 -07006# It provides the protocol compiler binary (i.e., protoc).
Yannic Bonenbergerbf0c69e2019-07-26 13:14:19 +02007#
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 Botc820dd02024-11-11 20:44:32 -080012# name = "com_google_protobuf",
Mike Kruskaled5c57a2022-08-10 22:51:29 -070013# sha256 = "c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126",
14# strip_prefix = "protobuf-3.21.3",
15# urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.3.tar.gz"],
Yannic Bonenbergerbf0c69e2019-07-26 13:14:19 +020016# )
Mike Kruskaled5c57a2022-08-10 22:51:29 -070017
Yannic Bonenbergerbf0c69e2019-07-26 13:14:19 +020018local_repository(
Feng Xiao74bf45f2017-09-08 15:44:09 -070019 name = "com_google_protobuf",
Yannic Bonenbergerbf0c69e2019-07-26 13:14:19 +020020 path = "..",
Feng Xiao74bf45f2017-09-08 15:44:09 -070021)
Feng Xiao74bf45f2017-09-08 15:44:09 -070022
Yannic Bonenbergerbf0c69e2019-07-26 13:14:19 +020023# Similar to com_google_protobuf but for Java lite. If you are building
Brian Wignalla104dff2020-01-08 13:18:20 -050024# for Android, the lite version should be preferred because it has a much
Feng Xiao74bf45f2017-09-08 15:44:09 -070025# smaller code size.
Rafi Kamale6c5a3b2019-11-27 11:10:45 -080026local_repository(
Feng Xiao74bf45f2017-09-08 15:44:09 -070027 name = "com_google_protobuf_javalite",
Rafi Kamale6c5a3b2019-11-27 11:10:45 -080028 path = "..",
Feng Xiao74bf45f2017-09-08 15:44:09 -070029)
Feng Xiao1a7ce042018-07-03 11:00:15 -070030
Alex Eagle71e40612024-03-28 08:24:50 -070031# Needed because protobuf_deps brings rules_python 0.26.0 which is broken:
32# https://github.com/bazelbuild/rules_python/issues/1543
33http_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 Botc820dd02024-11-11 20:44:32 -080040load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
Adam Cozzettee03c0d22018-12-11 15:57:26 -080041
Kent Rossb6375e02019-02-26 10:07:55 -080042protobuf_deps()
Protobuf Team Botc820dd02024-11-11 20:44:32 -080043
44http_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
52load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains")
53
54rules_java_dependencies()
55
56rules_java_toolchains()