Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 1 | """Load dependencies needed to compile the protobuf library as a 3rd-party consumer.""" |
| 2 | |
| 3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 4 | |
Adam Cozzette | c7dfd0d | 2021-10-28 10:34:54 -0700 | [diff] [blame] | 5 | PROTOBUF_MAVEN_ARTIFACTS = [ |
| 6 | "com.google.code.findbugs:jsr305:3.0.2", |
Elliotte Rusty Harold | b73f78d | 2022-01-05 21:23:54 +0000 | [diff] [blame] | 7 | "com.google.code.gson:gson:2.8.9", |
Adam Cozzette | c7dfd0d | 2021-10-28 10:34:54 -0700 | [diff] [blame] | 8 | "com.google.errorprone:error_prone_annotations:2.3.2", |
| 9 | "com.google.j2objc:j2objc-annotations:1.3", |
| 10 | "com.google.guava:guava:30.1.1-jre", |
Deanna Garcia | dfd99e7 | 2022-01-12 21:54:30 +0000 | [diff] [blame] | 11 | "com.google.guava:guava-testlib:30.1.1-jre", |
Adam Cozzette | c7dfd0d | 2021-10-28 10:34:54 -0700 | [diff] [blame] | 12 | "com.google.truth:truth:1.1.2", |
Elliotte Rusty Harold | 575d56b | 2022-03-22 21:54:53 +0000 | [diff] [blame] | 13 | "junit:junit:4.13.2", |
Adam Cozzette | f7232f2 | 2022-03-02 19:17:27 +0000 | [diff] [blame] | 14 | "org.mockito:mockito-core:4.3.1", |
Adam Cozzette | c7dfd0d | 2021-10-28 10:34:54 -0700 | [diff] [blame] | 15 | ] |
| 16 | |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 17 | def protobuf_deps(): |
| 18 | """Loads common dependencies needed to compile the protobuf library.""" |
| 19 | |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 20 | if not native.existing_rule("bazel_skylib"): |
| 21 | http_archive( |
| 22 | name = "bazel_skylib", |
Yannic | 948740b | 2020-01-15 19:27:35 +0100 | [diff] [blame] | 23 | sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44", |
| 24 | urls = [ |
| 25 | "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| 26 | "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| 27 | ], |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 28 | ) |
| 29 | |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 30 | if not native.existing_rule("zlib"): |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 31 | http_archive( |
Nic McDonald | f313b9c | 2019-04-12 15:41:08 -0700 | [diff] [blame] | 32 | name = "zlib", |
Xùdōng Yáng | 11de748 | 2021-11-05 01:56:32 +1100 | [diff] [blame] | 33 | build_file = Label("//:third_party/zlib.BUILD"), |
Keith Smiley | 516f8b1 | 2019-08-28 21:41:02 -0700 | [diff] [blame] | 34 | sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff", |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 35 | strip_prefix = "zlib-1.2.11", |
Keith Smiley | 516f8b1 | 2019-08-28 21:41:02 -0700 | [diff] [blame] | 36 | urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"], |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 37 | ) |
Adam Liddell | a74c43b | 2019-07-15 23:35:19 +0000 | [diff] [blame] | 38 | |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 39 | if not native.existing_rule("rules_cc"): |
| 40 | http_archive( |
| 41 | name = "rules_cc", |
Andreas Herrmann | 24fa955 | 2020-05-26 10:07:20 +0200 | [diff] [blame] | 42 | sha256 = "9d48151ea71b3e225adfb6867e6d2c7d0dce46cbdc8710d9a9a628574dfd40a0", |
| 43 | strip_prefix = "rules_cc-818289e5613731ae410efb54218a4077fb9dbb03", |
| 44 | urls = ["https://github.com/bazelbuild/rules_cc/archive/818289e5613731ae410efb54218a4077fb9dbb03.tar.gz"], |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 45 | ) |
| 46 | |
| 47 | if not native.existing_rule("rules_java"): |
| 48 | http_archive( |
| 49 | name = "rules_java", |
| 50 | sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", |
| 51 | strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", |
| 52 | urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"], |
| 53 | ) |
| 54 | |
| 55 | if not native.existing_rule("rules_proto"): |
| 56 | http_archive( |
| 57 | name = "rules_proto", |
Dor | ee04809 | 2021-04-09 21:12:25 +0300 | [diff] [blame] | 58 | sha256 = "a4382f78723af788f0bc19fd4c8411f44ffe0a72723670a34692ffad56ada3ac", |
| 59 | strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf", |
| 60 | urls = ["https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip"], |
Yannic Bonenberger | d2d6ff5 | 2019-08-06 21:12:06 +0200 | [diff] [blame] | 61 | ) |
| 62 | |
| 63 | if not native.existing_rule("rules_python"): |
| 64 | http_archive( |
| 65 | name = "rules_python", |
Dirk Boye | 9eba6ed | 2021-10-13 22:54:54 +0200 | [diff] [blame] | 66 | sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0", |
| 67 | urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz"], |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 68 | ) |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 69 | |
| 70 | if not native.existing_rule("rules_jvm_external"): |
Adam Cozzette | c7dfd0d | 2021-10-28 10:34:54 -0700 | [diff] [blame] | 71 | http_archive( |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 72 | name = "rules_jvm_external", |
Deanna Garcia | aafcb92 | 2022-02-28 18:28:50 +0000 | [diff] [blame] | 73 | sha256 = "744bd7436f63af7e9872948773b8b106016dc164acb3960b4963f86754532ee7", |
| 74 | strip_prefix = "rules_jvm_external-906875b0d5eaaf61a8ca2c9c3835bde6f435d011", |
| 75 | urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/906875b0d5eaaf61a8ca2c9c3835bde6f435d011.zip"], |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 76 | ) |
Deanna Garcia | 7924cd6 | 2022-01-13 00:10:23 +0000 | [diff] [blame] | 77 | |
Derek Perez | 3a4d931 | 2021-11-04 22:57:29 +0000 | [diff] [blame] | 78 | if not native.existing_rule("rules_pkg"): |
| 79 | http_archive( |
| 80 | name = "rules_pkg", |
| 81 | urls = [ |
| 82 | "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz", |
| 83 | "https://github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz", |
| 84 | ], |
| 85 | sha256 = "a89e203d3cf264e564fcb96b6e06dd70bc0557356eb48400ce4b5d97c2c3720d", |
| 86 | ) |
Deanna Garcia | 7924cd6 | 2022-01-13 00:10:23 +0000 | [diff] [blame] | 87 | |
| 88 | if not native.existing_rule("io_bazel_rules_kotlin"): |
| 89 | http_archive( |
| 90 | name = "io_bazel_rules_kotlin", |
| 91 | urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.5.0-beta-4/rules_kotlin_release.tgz"], |
| 92 | sha256 = "6cbd4e5768bdfae1598662e40272729ec9ece8b7bded8f0d2c81c8ff96dc139d", |
| 93 | ) |