forked from google/closure-compiler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWORKSPACE.bazel
184 lines (159 loc) · 5.99 KB
/
WORKSPACE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
workspace(name = "com_google_javascript_jscomp")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_JVM_EXTERNAL_TAG = "4.5"
RULES_JVM_EXTERNAL_SHA = "b17d7388feb9bfa7f2fa09031b32707df529f26c91ab9e5d909eb1676badd9a6"
http_archive(
name = "rules_jvm_external",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)
load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
rules_jvm_external_deps()
load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
rules_jvm_external_setup()
#
# To update google_bazel_common, locate the git commit to depend on and
# use something like the following to determine the sha256
# curl -L https://github.com/google/bazel-common/archive/<git-commit-id>.zip |
# sha256
#
#
http_archive(
name = "google_bazel_common",
# output from `sha256sum` on the downloaded zip file
sha256 = "bcb5de5a5b951434828ead94479d3e1ff6501c2c8fc490db6cf3fbf7c188684b",
strip_prefix = "bazel-common-aaa4d801588f7744c6f4428e4f133f26b8518f42",
urls = [
"https://github.com/google/bazel-common/archive/aaa4d801588f7744c6f4428e4f133f26b8518f42.zip",
],
)
load("@google_bazel_common//:workspace_defs.bzl", "google_common_workspace_rules", "maven_import")
google_common_workspace_rules()
maven_import(
# http://args4j.kohsuke.org/index.html
group_id = "args4j",
artifact_id = "args4j",
version = "2.33",
sha256 = "91ddeaba0b24adce72291c618c00bbdce1c884755f6c4dba9c5c46e871c69ed6",
licenses = ["notice"],
)
maven_import(
# https://github.com/java-diff-utils/java-diff-utils
group_id = "io.github.java-diff-utils",
artifact_id = "java-diff-utils",
version = "4.0",
sha256 = "810232374e76a954949f0e2185cd7d9515addb918cf3da3481f77e07c356b49a",
licenses = ["notice"],
)
maven_import(
# https://github.com/google/gson
group_id = "com.google.code.gson",
artifact_id = "gson",
version = "2.9.1",
sha256 = "378534e339e6e6d50b1736fb3abb76f1c15d1be3f4c13cec6d536412e23da603",
licenses = ["notice"],
)
maven_import(
# https://github.com/google/re2j
group_id ="com.google.re2j",
artifact_id = "re2j",
version ="1.3",
sha256 = "d8040fa1c54c1ce208199015b6e599ec2ef37b7780f8f55a8b4b4b4299bade19",
licenses = ["notice"],
)
maven_import(
# https://ant.apache.org/
group_id ="org.apache.ant",
artifact_id = "ant",
version ="1.10.11",
sha256 = "88c0b89bbbaae01e0d9fcae93be792f5abbe3409106f8eee858fdf365dbc0754",
licenses = ["notice"],
)
maven_import(
# https://github.com/jspecify/jspecify/
group_id ="org.jspecify",
artifact_id = "jspecify",
version ="0.2.0",
sha256 = "7da399e8d2be9474406fe7c06904012880e8aa96833adab126119c8d10b7c0ae",
licenses = ["notice"],
)
maven_import(
# annotations from https://github.com/google/error-prone
group_id = "com.google.errorprone",
artifact_id = "error_prone_annotations",
version = "2.15.0",
sha256 = "067047714349e7789a5bdbfad9d1c0af9f3a1eb28c55a0ee3f68e682f905c4eb",
licenses = ["notice"],
)
maven_import(
# https://truth.dev/protobufs
group_id = "com.google.truth.extensions",
artifact_id = "truth-liteproto-extension",
version = "1.1",
sha256 = "f637de4743194a870316a55a1c50c89638355a2323d96b6ced363a22d6ced316",
licenses = ["notice"],
)
maven_import(
# https://truth.dev/protobufs
group_id = "com.google.truth.extensions",
artifact_id = "truth-proto-extension",
version = "1.1",
sha256 = "d2fa8736dcb541813f8f4090ecc0d634b85cb82bd6d486f1af975458d0238afe",
licenses = ["notice"],
)
maven_import(
# https://github.com/google/jimfs
group_id = "com.google.jimfs",
artifact_id = "jimfs",
version = "1.2",
sha256 = "de16d5c8489729a8512f1a02fbd81f58f89249b72066987da4cc5c87ecb9f72d",
licenses = ["notice"],
)
http_archive(
name = "protobuf_proto_rules",
# output from `sha256sum` on the downloaded tar.gz file
sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1",
strip_prefix = "rules_proto-4.0.0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
],
)
load("@protobuf_proto_rules//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
# From https://github.com/bazelbuild/rules_java/releases/
http_archive(
name = "rules_java",
url = "https://github.com/bazelbuild/rules_java/releases/download/5.1.0/rules_java-5.1.0.tar.gz",
sha256 = "d974a2d6e1a534856d1b60ad6a15e57f3970d8596fbb0bb17b9ee26ca209332a",
)
load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains")
rules_java_dependencies()
rules_java_toolchains()
# Jarjar is a Google tool (https://github.com/google/jarjar) for generating
# shaded JARs (https://stackoverflow.com/questions/49810578). This repo contains
# Bazel bindings for Jarjar, under the Apache license.
http_archive(
name = "com_github_johnynek_bazel_jar_jar",
# output from `sha256sum` on the downloaded zip file
sha256 = "fdf2c5276e5c6f27efa1e0b64a301f5a122d84a4c1c0dd80006dbbc530a16773",
strip_prefix = "bazel_jar_jar-171f268569384c57c19474b04aebe574d85fde0d",
urls = [
"https://github.com/johnynek/bazel_jar_jar/archive/171f268569384c57c19474b04aebe574d85fde0d.zip",
],
)
load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories")
jar_jar_repositories()
# Declare protobuf-java from maven central, so the unshaded maven jar can recognize external dependencies
load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
"com.google.protobuf:protobuf-java:3.21.12",
],
repositories = [
"https://repo1.maven.org/maven2",
],
strict_visibility = True,
)