protobuf_deps.bzl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. """Load dependencies needed to compile the protobuf library as a 3rd-party consumer."""
  2. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  3. PROTOBUF_MAVEN_ARTIFACTS = [
  4. "com.google.code.findbugs:jsr305:3.0.2",
  5. "com.google.code.gson:gson:2.8.6",
  6. "com.google.errorprone:error_prone_annotations:2.3.2",
  7. "com.google.j2objc:j2objc-annotations:1.3",
  8. "com.google.guava:guava:30.1.1-jre",
  9. "com.google.truth:truth:1.1.2",
  10. "junit:junit:4.12",
  11. "org.easymock:easymock:3.2",
  12. ]
  13. def protobuf_deps():
  14. """Loads common dependencies needed to compile the protobuf library."""
  15. if not native.existing_rule("bazel_skylib"):
  16. http_archive(
  17. name = "bazel_skylib",
  18. sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
  19. urls = [
  20. "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
  21. "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
  22. ],
  23. )
  24. if not native.existing_rule("zlib"):
  25. http_archive(
  26. name = "zlib",
  27. build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
  28. sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
  29. strip_prefix = "zlib-1.2.11",
  30. urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
  31. )
  32. if not native.existing_rule("rules_cc"):
  33. http_archive(
  34. name = "rules_cc",
  35. sha256 = "9d48151ea71b3e225adfb6867e6d2c7d0dce46cbdc8710d9a9a628574dfd40a0",
  36. strip_prefix = "rules_cc-818289e5613731ae410efb54218a4077fb9dbb03",
  37. urls = ["https://github.com/bazelbuild/rules_cc/archive/818289e5613731ae410efb54218a4077fb9dbb03.tar.gz"],
  38. )
  39. if not native.existing_rule("rules_java"):
  40. http_archive(
  41. name = "rules_java",
  42. sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3",
  43. strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
  44. urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"],
  45. )
  46. if not native.existing_rule("rules_proto"):
  47. http_archive(
  48. name = "rules_proto",
  49. sha256 = "a4382f78723af788f0bc19fd4c8411f44ffe0a72723670a34692ffad56ada3ac",
  50. strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf",
  51. urls = ["https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip"],
  52. )
  53. if not native.existing_rule("rules_python"):
  54. http_archive(
  55. name = "rules_python",
  56. sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
  57. urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz"],
  58. )
  59. if not native.existing_rule("rules_jvm_external"):
  60. http_archive(
  61. name = "rules_jvm_external",
  62. sha256 = "f36441aa876c4f6427bfb2d1f2d723b48e9d930b62662bf723ddfb8fc80f0140",
  63. strip_prefix = "rules_jvm_external-4.1",
  64. urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/4.1.zip"],
  65. )