2019-02-26 18:07:55 +00:00
|
|
|
"""Load dependencies needed to compile the protobuf library as a 3rd-party consumer."""
|
|
|
|
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
2021-10-28 17:34:54 +00:00
|
|
|
PROTOBUF_MAVEN_ARTIFACTS = [
|
|
|
|
"com.google.code.findbugs:jsr305:3.0.2",
|
2022-01-05 21:23:54 +00:00
|
|
|
"com.google.code.gson:gson:2.8.9",
|
2021-10-28 17:34:54 +00:00
|
|
|
"com.google.errorprone:error_prone_annotations:2.3.2",
|
|
|
|
"com.google.j2objc:j2objc-annotations:1.3",
|
|
|
|
"com.google.guava:guava:30.1.1-jre",
|
2022-01-12 21:54:30 +00:00
|
|
|
"com.google.guava:guava-testlib:30.1.1-jre",
|
2021-10-28 17:34:54 +00:00
|
|
|
"com.google.truth:truth:1.1.2",
|
|
|
|
"junit:junit:4.12",
|
|
|
|
"org.easymock:easymock:3.2",
|
|
|
|
]
|
|
|
|
|
2019-02-26 18:07:55 +00:00
|
|
|
def protobuf_deps():
|
|
|
|
"""Loads common dependencies needed to compile the protobuf library."""
|
|
|
|
|
2019-07-26 11:14:19 +00:00
|
|
|
if not native.existing_rule("bazel_skylib"):
|
|
|
|
http_archive(
|
|
|
|
name = "bazel_skylib",
|
2020-01-15 18:27:35 +00:00
|
|
|
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
|
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
|
|
|
],
|
2019-07-26 11:14:19 +00:00
|
|
|
)
|
|
|
|
|
2019-07-23 14:28:57 +00:00
|
|
|
if not native.existing_rule("zlib"):
|
2019-02-26 18:07:55 +00:00
|
|
|
http_archive(
|
2019-04-12 22:41:08 +00:00
|
|
|
name = "zlib",
|
2021-11-04 14:56:32 +00:00
|
|
|
build_file = Label("//:third_party/zlib.BUILD"),
|
2019-08-29 04:41:02 +00:00
|
|
|
sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
|
2019-02-26 18:07:55 +00:00
|
|
|
strip_prefix = "zlib-1.2.11",
|
2019-08-29 04:41:02 +00:00
|
|
|
urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
|
2019-02-26 18:07:55 +00:00
|
|
|
)
|
2019-07-15 23:35:19 +00:00
|
|
|
|
2019-07-23 14:28:57 +00:00
|
|
|
if not native.existing_rule("rules_cc"):
|
|
|
|
http_archive(
|
|
|
|
name = "rules_cc",
|
2020-05-26 08:07:20 +00:00
|
|
|
sha256 = "9d48151ea71b3e225adfb6867e6d2c7d0dce46cbdc8710d9a9a628574dfd40a0",
|
|
|
|
strip_prefix = "rules_cc-818289e5613731ae410efb54218a4077fb9dbb03",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_cc/archive/818289e5613731ae410efb54218a4077fb9dbb03.tar.gz"],
|
2019-07-23 14:28:57 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if not native.existing_rule("rules_java"):
|
|
|
|
http_archive(
|
|
|
|
name = "rules_java",
|
|
|
|
sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3",
|
|
|
|
strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"],
|
|
|
|
)
|
|
|
|
|
|
|
|
if not native.existing_rule("rules_proto"):
|
|
|
|
http_archive(
|
|
|
|
name = "rules_proto",
|
2021-04-09 18:12:25 +00:00
|
|
|
sha256 = "a4382f78723af788f0bc19fd4c8411f44ffe0a72723670a34692ffad56ada3ac",
|
|
|
|
strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip"],
|
2019-08-06 19:12:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if not native.existing_rule("rules_python"):
|
|
|
|
http_archive(
|
|
|
|
name = "rules_python",
|
2021-10-13 20:54:54 +00:00
|
|
|
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz"],
|
2019-07-23 14:28:57 +00:00
|
|
|
)
|
2021-04-20 18:36:32 +00:00
|
|
|
|
|
|
|
if not native.existing_rule("rules_jvm_external"):
|
2021-10-28 17:34:54 +00:00
|
|
|
http_archive(
|
2021-04-20 18:36:32 +00:00
|
|
|
name = "rules_jvm_external",
|
2021-07-08 16:05:05 +00:00
|
|
|
sha256 = "f36441aa876c4f6427bfb2d1f2d723b48e9d930b62662bf723ddfb8fc80f0140",
|
|
|
|
strip_prefix = "rules_jvm_external-4.1",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/4.1.zip"],
|
2021-04-20 18:36:32 +00:00
|
|
|
)
|
2022-01-13 00:10:23 +00:00
|
|
|
|
2021-11-04 22:57:29 +00:00
|
|
|
if not native.existing_rule("rules_pkg"):
|
|
|
|
http_archive(
|
|
|
|
name = "rules_pkg",
|
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
|
|
|
|
],
|
|
|
|
sha256 = "a89e203d3cf264e564fcb96b6e06dd70bc0557356eb48400ce4b5d97c2c3720d",
|
|
|
|
)
|
2022-01-13 00:10:23 +00:00
|
|
|
|
|
|
|
if not native.existing_rule("io_bazel_rules_kotlin"):
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_kotlin",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.5.0-beta-4/rules_kotlin_release.tgz"],
|
|
|
|
sha256 = "6cbd4e5768bdfae1598662e40272729ec9ece8b7bded8f0d2c81c8ff96dc139d",
|
|
|
|
)
|