blob: f0af91785d169ad2cbd2c026960762661a8dfda5 [file] [log] [blame]
iirinad4651e82019-03-15 03:15:37 -07001package(default_visibility = ["//visibility:public"])
Ivo Listbe0f07e2020-10-07 12:14:13 -07002
Klaus Aehligd0137212019-11-15 00:45:13 -08003exports_files(glob(["**/*.jar"]))
iirinad4651e82019-03-15 03:15:37 -07004
5licenses(["notice"]) # Apache 2.0
6
iirinaf5a6ee12019-07-23 02:02:24 -07007load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library")
Yannic Bonenberger38fb90c2019-08-23 02:34:28 -07008load("@rules_proto//proto:defs.bzl", "proto_library")
iirinae8260492019-07-03 05:16:09 -07009
Stephan Wolskif1bbe582019-08-27 00:58:23 -070010SUPRESSED_WARNINGS = select({
11 ":windows": [],
12 "//conditions:default": [
13 "-Wno-error",
14 "-Wno-old-style-cast",
15 ],
16})
17
iirinad4651e82019-03-15 03:15:37 -070018filegroup(
iirinad4651e82019-03-15 03:15:37 -070019 name = "GenClass",
20 srcs = ["java_tools/GenClass_deploy.jar"],
21)
22
iirina3dc59e42019-05-31 06:44:21 -070023filegroup(
24 name = "jacoco_coverage_runner_filegroup",
25 srcs = ["java_tools/JacocoCoverage_jarjar_deploy.jar"],
26)
27
iirinad6545102019-05-21 06:53:59 -070028java_import(
29 name = "jacoco_coverage_runner",
30 jars = ["java_tools/JacocoCoverage_jarjar_deploy.jar"],
31)
32
iirinad4651e82019-03-15 03:15:37 -070033filegroup(
34 name = "JacocoCoverage",
35 srcs = ["java_tools/JacocoCoverage_jarjar_deploy.jar"],
36)
37
38filegroup(
39 name = "JavaBuilder",
40 srcs = ["java_tools/JavaBuilder_deploy.jar"],
41)
42
43filegroup(
44 name = "Runner",
45 srcs = ["java_tools/Runner_deploy.jar"],
46)
47
48filegroup(
49 name = "VanillaJavaBuilder",
50 srcs = ["java_tools/VanillaJavaBuilder_deploy.jar"],
51)
52
53filegroup(
iirinad4651e82019-03-15 03:15:37 -070054 name = "Turbine",
55 srcs = ["java_tools/turbine_deploy.jar"],
56)
57
58filegroup(
59 name = "TurbineDirect",
60 srcs = ["java_tools/turbine_direct_binary_deploy.jar"],
61)
62
63filegroup(
64 name = "javac_jar",
65 srcs = ["java_tools/javac-9+181-r4173-1.jar"],
66)
67
68filegroup(
69 name = "jdk_compiler_jar",
70 srcs = ["java_tools/jdk_compiler.jar"],
71)
72
73filegroup(
74 name = "java_compiler_jar",
75 srcs = ["java_tools/java_compiler.jar"],
76)
77
iirina4e001992019-04-26 04:55:47 -070078java_import(
79 name = "jacoco-agent",
Ivo Listdf6d30b2021-09-24 07:16:15 -070080 jars = ["java_tools/third_party/java/jacoco/org.jacoco.agent-0.8.7.jar"],
81 srcjar = "java_tools/third_party/java/jacoco/org.jacoco.agent-0.8.7-sources.jar",
iirina4e001992019-04-26 04:55:47 -070082)
83
84java_import(
85 name = "jacoco-core",
Ivo Listdf6d30b2021-09-24 07:16:15 -070086 jars = ["java_tools/third_party/java/jacoco/org.jacoco.core-0.8.7.jar"],
87 srcjar = "java_tools/third_party/java/jacoco/org.jacoco.core-0.8.7-sources.jar",
iirina4e001992019-04-26 04:55:47 -070088 exports = [
89 ":asm",
90 ":asm-commons",
91 ":asm-tree",
92 ],
93)
94
95filegroup(
96 name = "jacoco-core-jars",
Ivo Listdf6d30b2021-09-24 07:16:15 -070097 srcs = ["java_tools/third_party/java/jacoco/org.jacoco.core-0.8.7.jar"],
iirina4e001992019-04-26 04:55:47 -070098)
99
100java_import(
101 name = "jacoco-report",
Ivo Listdf6d30b2021-09-24 07:16:15 -0700102 jars = ["java_tools/third_party/java/jacoco/org.jacoco.report-0.8.7.jar"],
iirinac9522f92019-05-28 02:18:58 -0700103 srcjar = "java_tools/third_party/java/jacoco/org.jacoco.report-sources.jar",
iirina4e001992019-04-26 04:55:47 -0700104 exports = [
iirina4e001992019-04-26 04:55:47 -0700105 ":asm",
iirinab0317492019-04-29 09:26:43 -0700106 ":jacoco-core",
iirina4e001992019-04-26 04:55:47 -0700107 ],
108)
109
110java_import(
111 name = "bazel-jacoco-agent",
Ivo Listdf6d30b2021-09-24 07:16:15 -0700112 jars = ["java_tools/third_party/java/jacoco/jacocoagent-0.8.7.jar"],
iirina4e001992019-04-26 04:55:47 -0700113)
114
115java_import(
116 name = "bazel-jacoco-agent-neverlink",
Ivo Listdf6d30b2021-09-24 07:16:15 -0700117 jars = ["java_tools/third_party/java/jacoco/jacocoagent-0.8.7.jar"],
iirina4e001992019-04-26 04:55:47 -0700118 neverlink = 1,
119)
120
121java_import(
122 name = "asm",
Ivo Listcb7c1a22021-04-12 07:20:45 -0700123 jars = ["java_tools/third_party/java/jacoco/asm-9.1.jar"],
124 srcjar = "java_tools/third_party/java/jacoco/asm-9.1-sources.jar",
iirina4e001992019-04-26 04:55:47 -0700125)
126
127java_import(
128 name = "asm-commons",
Ivo Listcb7c1a22021-04-12 07:20:45 -0700129 jars = ["java_tools/third_party/java/jacoco/asm-commons-9.1.jar"],
130 srcjar = "java_tools/third_party/java/jacoco/asm-commons-9.1-sources.jar",
iirina4e001992019-04-26 04:55:47 -0700131 runtime_deps = [":asm-tree"],
132)
133
134java_import(
135 name = "asm-tree",
Ivo Listcb7c1a22021-04-12 07:20:45 -0700136 jars = ["java_tools/third_party/java/jacoco/asm-tree-9.1.jar"],
137 srcjar = "java_tools/third_party/java/jacoco/asm-tree-9.1-sources.jar",
iirina4e001992019-04-26 04:55:47 -0700138 runtime_deps = [":asm"],
139)
140
iirinad4651e82019-03-15 03:15:37 -0700141config_setting(
iirinad4651e82019-03-15 03:15:37 -0700142 name = "windows",
Ivo Liste68b1e32020-11-12 08:28:55 -0800143 constraint_values = ["@platforms//os:windows"],
iirinad4651e82019-03-15 03:15:37 -0700144)
145
iirinae4ac6162019-04-08 01:37:20 -0700146config_setting(
147 name = "freebsd",
Ivo Liste68b1e32020-11-12 08:28:55 -0800148 constraint_values = ["@platforms//os:freebsd"],
iirinae4ac6162019-04-08 01:37:20 -0700149 visibility = ["//visibility:public"],
150)
151
Googler5e53b152020-07-06 17:38:14 -0700152config_setting(
153 name = "openbsd",
Ivo Liste68b1e32020-11-12 08:28:55 -0800154 constraint_values = ["@platforms//os:openbsd"],
Googler5e53b152020-07-06 17:38:14 -0700155 visibility = ["//visibility:public"],
156)
157
Yun Peng2bdd3282019-07-23 05:46:01 -0700158cc_library(
159 name = "malloc",
160)
161
iirinad4651e82019-03-15 03:15:37 -0700162cc_binary(
163 name = "ijar_cc_binary",
164 srcs = [
165 "java_tools/ijar/classfile.cc",
166 "java_tools/ijar/ijar.cc",
167 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700168 copts = SUPRESSED_WARNINGS,
Yun Peng2bdd3282019-07-23 05:46:01 -0700169 # Remove dependency on @bazel_tools//tools/cpp:malloc, which avoid /Iexternal/tools being used
170 # in compiling actions.
171 malloc = ":malloc",
iirinad4651e82019-03-15 03:15:37 -0700172 deps = [":zip"],
173)
174
175cc_library(
176 name = "zip",
177 srcs = [
178 "java_tools/ijar/zip.cc",
179 ] + select({
180 ":windows": [
181 "java_tools/ijar/mapped_file_windows.cc",
182 ],
183 "//conditions:default": [
184 "java_tools/ijar/mapped_file_unix.cc",
185 ],
186 }),
187 hdrs = [
188 "java_tools/ijar/common.h",
189 "java_tools/ijar/mapped_file.h",
190 "java_tools/ijar/zip.h",
191 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700192 copts = SUPRESSED_WARNINGS,
iirinab0317492019-04-29 09:26:43 -0700193 include_prefix = "third_party",
194 strip_include_prefix = "java_tools",
iirinad4651e82019-03-15 03:15:37 -0700195 deps = [
196 ":platform_utils",
197 ":zlib_client",
198 ] + select({
199 ":windows": [
200 ":errors",
201 ":filesystem",
202 ":logging",
203 ":strings",
204 ],
205 "//conditions:default": [
206 ],
207 }),
iirinad4651e82019-03-15 03:15:37 -0700208)
209
210cc_library(
211 name = "platform_utils",
212 srcs = ["java_tools/ijar/platform_utils.cc"],
213 hdrs = [
214 "java_tools/ijar/common.h",
215 "java_tools/ijar/platform_utils.h",
216 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700217 copts = SUPRESSED_WARNINGS,
iirinab0317492019-04-29 09:26:43 -0700218 include_prefix = "third_party",
219 strip_include_prefix = "java_tools",
iirinad4651e82019-03-15 03:15:37 -0700220 visibility = ["//visibility:private"],
221 deps = [
222 ":errors",
223 ":filesystem",
224 ":logging",
225 ],
iirinad4651e82019-03-15 03:15:37 -0700226)
227
228cc_library(
iirinae4ac6162019-04-08 01:37:20 -0700229 name = "cpp_util",
230 hdrs = [
231 "java_tools/src/main/cpp/util/errors.h",
232 "java_tools/src/main/cpp/util/file.h",
233 "java_tools/src/main/cpp/util/file_platform.h",
234 "java_tools/src/main/cpp/util/md5.h",
235 "java_tools/src/main/cpp/util/numbers.h",
236 "java_tools/src/main/cpp/util/path.h",
237 "java_tools/src/main/cpp/util/path_platform.h",
238 "java_tools/src/main/cpp/util/port.h",
239 ],
iirinab0317492019-04-29 09:26:43 -0700240 strip_include_prefix = "java_tools",
iirinae4ac6162019-04-08 01:37:20 -0700241 visibility = ["//visibility:public"],
242 deps = [
243 ":blaze_exit_code",
244 ":errors",
245 ":filesystem",
246 ":md5",
247 ":numbers",
248 ":port",
249 ":strings",
250 ],
iirinae4ac6162019-04-08 01:37:20 -0700251)
252
253cc_library(
254 name = "md5",
255 srcs = ["java_tools/src/main/cpp/util/md5.cc"],
256 hdrs = ["java_tools/src/main/cpp/util/md5.h"],
257 strip_include_prefix = "java_tools",
258)
259
260cc_library(
261 name = "numbers",
262 srcs = ["java_tools/src/main/cpp/util/numbers.cc"],
263 hdrs = ["java_tools/src/main/cpp/util/numbers.h"],
iirinae4ac6162019-04-08 01:37:20 -0700264 strip_include_prefix = "java_tools",
iirinab0317492019-04-29 09:26:43 -0700265 deps = [":strings"],
iirinae4ac6162019-04-08 01:37:20 -0700266)
267
268cc_library(
iirinad4651e82019-03-15 03:15:37 -0700269 name = "filesystem",
270 srcs = [
271 "java_tools/src/main/cpp/util/file.cc",
272 "java_tools/src/main/cpp/util/path.cc",
273 ] + select({
274 ":windows": [
275 "java_tools/src/main/cpp/util/file_windows.cc",
276 "java_tools/src/main/cpp/util/path_windows.cc",
277 ],
278 "//conditions:default": [
279 "java_tools/src/main/cpp/util/file_posix.cc",
280 "java_tools/src/main/cpp/util/path_posix.cc",
281 ],
282 }),
283 hdrs = [
284 "java_tools/src/main/cpp/util/file.h",
285 "java_tools/src/main/cpp/util/file_platform.h",
286 "java_tools/src/main/cpp/util/path.h",
287 "java_tools/src/main/cpp/util/path_platform.h",
288 ],
iirinab0317492019-04-29 09:26:43 -0700289 strip_include_prefix = "java_tools",
iirinad4651e82019-03-15 03:15:37 -0700290 deps = [
291 ":blaze_exit_code",
292 ":errors",
293 ":logging",
294 ":strings",
295 ] + select({
296 ":windows": [":lib-file"],
297 "//conditions:default": [],
298 }),
iirinad4651e82019-03-15 03:15:37 -0700299)
300
301cc_library(
302 name = "lib-file",
iirinaf5a6ee12019-07-23 02:02:24 -0700303 srcs = [
304 "java_tools/src/main/native/windows/file.cc",
305 "java_tools/src/main/native/windows/util.cc",
306 ],
307 hdrs = [
308 "java_tools/src/main/native/windows/file.h",
309 "java_tools/src/main/native/windows/util.h",
310 ],
Kevin Hogeland2f0927a2021-05-21 01:14:24 -0700311 linkopts = [
312 "-DEFAULTLIB:advapi32.lib",
313 ],
iirinad4651e82019-03-15 03:15:37 -0700314 strip_include_prefix = "java_tools",
315)
316
317cc_library(
iirinad4651e82019-03-15 03:15:37 -0700318 name = "errors",
319 srcs = select({
320 ":windows": ["java_tools/src/main/cpp/util/errors_windows.cc"],
321 "//conditions:default": ["java_tools/src/main/cpp/util/errors_posix.cc"],
322 }),
323 hdrs = ["java_tools/src/main/cpp/util/errors.h"],
iirinab0317492019-04-29 09:26:43 -0700324 strip_include_prefix = "java_tools",
iirinad4651e82019-03-15 03:15:37 -0700325 deps = [
326 ":logging",
327 ":port",
328 ":strings",
329 ],
iirinad4651e82019-03-15 03:15:37 -0700330)
331
332cc_library(
333 name = "strings",
334 srcs = ["java_tools/src/main/cpp/util/strings.cc"],
335 hdrs = ["java_tools/src/main/cpp/util/strings.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700336 copts = SUPRESSED_WARNINGS,
iirinad4651e82019-03-15 03:15:37 -0700337 # Automatically propagate the symbol definition to rules depending on this.
338 defines = [
339 "BLAZE_OPENSOURCE",
340 ],
iirinad4651e82019-03-15 03:15:37 -0700341 strip_include_prefix = "java_tools",
iirinab0317492019-04-29 09:26:43 -0700342 deps = [":blaze_exit_code"],
iirinad4651e82019-03-15 03:15:37 -0700343)
344
345cc_library(
346 name = "blaze_exit_code",
347 hdrs = ["java_tools/src/main/cpp/util/exit_code.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700348 copts = SUPRESSED_WARNINGS,
iirinad4651e82019-03-15 03:15:37 -0700349 strip_include_prefix = "java_tools",
350)
351
iirinad4651e82019-03-15 03:15:37 -0700352cc_library(
353 name = "port",
354 srcs = ["java_tools/src/main/cpp/util/port.cc"],
355 hdrs = ["java_tools/src/main/cpp/util/port.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700356 copts = SUPRESSED_WARNINGS,
iirinad4651e82019-03-15 03:15:37 -0700357 strip_include_prefix = "java_tools",
358)
359
360cc_library(
361 name = "logging",
362 srcs = ["java_tools/src/main/cpp/util/logging.cc"],
363 hdrs = ["java_tools/src/main/cpp/util/logging.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700364 copts = SUPRESSED_WARNINGS,
iirinab0317492019-04-29 09:26:43 -0700365 strip_include_prefix = "java_tools",
iirinad4651e82019-03-15 03:15:37 -0700366 deps = [
367 ":blaze_exit_code",
368 ":strings",
369 ],
iirinad4651e82019-03-15 03:15:37 -0700370)
371
372cc_library(
373 name = "zlib_client",
374 srcs = ["java_tools/ijar/zlib_client.cc"],
375 hdrs = [
376 "java_tools/ijar/common.h",
377 "java_tools/ijar/zlib_client.h",
378 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700379 copts = SUPRESSED_WARNINGS,
iirinad4651e82019-03-15 03:15:37 -0700380 include_prefix = "third_party",
iirinab0317492019-04-29 09:26:43 -0700381 strip_include_prefix = "java_tools",
382 deps = ["//java_tools/zlib"],
iirinad4651e82019-03-15 03:15:37 -0700383)
iirinae4ac6162019-04-08 01:37:20 -0700384
385##################### singlejar
386
387cc_binary(
iirinaebdbdcd2019-04-09 04:43:08 -0700388 name = "singlejar_cc_bin",
iirinae4ac6162019-04-08 01:37:20 -0700389 srcs = [
390 "java_tools/src/tools/singlejar/singlejar_main.cc",
391 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700392 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700393 linkopts = select({
394 ":freebsd": ["-lm"],
Googler5e53b152020-07-06 17:38:14 -0700395 ":openbsd": ["-lm"],
iirinae4ac6162019-04-08 01:37:20 -0700396 "//conditions:default": [],
397 }),
398 linkstatic = 1,
Yun Peng2bdd3282019-07-23 05:46:01 -0700399 # Remove dependency on @bazel_tools//tools/cpp:malloc, which avoid /Iexternal/tools being used
400 # in compiling actions.
401 malloc = ":malloc",
iirinae4ac6162019-04-08 01:37:20 -0700402 visibility = ["//visibility:public"],
403 deps = [
404 ":options",
405 ":output_jar",
406 "//java_tools/zlib",
407 ],
408)
409
410cc_binary(
411 name = "singlejar_local",
412 srcs = [
413 "java_tools/src/tools/singlejar/singlejar_local_main.cc",
414 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700415 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700416 linkopts = select({
417 ":freebsd": ["-lm"],
Googler5e53b152020-07-06 17:38:14 -0700418 ":openbsd": ["-lm"],
iirinae4ac6162019-04-08 01:37:20 -0700419 "//conditions:default": [],
420 }),
421 linkstatic = 1,
422 visibility = ["//visibility:public"],
423 deps = [
424 ":combiners",
425 ":desugar_checking",
426 ":options",
427 ":output_jar",
428 "//java_tools/zlib",
429 ],
430)
431
432cc_library(
433 name = "combiners",
434 srcs = [
435 "java_tools/src/tools/singlejar/combiners.cc",
iirinaebdbdcd2019-04-09 04:43:08 -0700436 ],
437 hdrs = [
438 "java_tools/src/tools/singlejar/combiners.h",
iirinae4ac6162019-04-08 01:37:20 -0700439 ":transient_bytes",
iirinae4ac6162019-04-08 01:37:20 -0700440 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700441 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700442 strip_include_prefix = "java_tools",
443 deps = [
444 "//java_tools/zlib",
445 ],
446)
447
448proto_library(
iirinab0317492019-04-29 09:26:43 -0700449 name = "desugar_deps_proto",
450 srcs = ["java_tools/src/main/protobuf/desugar_deps.proto"],
iirinae4ac6162019-04-08 01:37:20 -0700451)
452
453cc_proto_library(
454 name = "desugar_deps_cc_proto",
455 deps = [":desugar_deps_proto"],
456)
457
458cc_library(
459 name = "desugar_checking",
460 srcs = ["java_tools/src/tools/singlejar/desugar_checking.cc"],
461 hdrs = ["java_tools/src/tools/singlejar/desugar_checking.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700462 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700463 strip_include_prefix = "java_tools",
464 deps = [
465 ":combiners",
466 ":desugar_deps_cc_proto",
467 ],
468)
469
470cc_library(
471 name = "diag",
472 hdrs = ["java_tools/src/tools/singlejar/diag.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700473 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700474 strip_include_prefix = "java_tools",
475 visibility = ["//visibility:private"],
476)
477
478cc_library(
479 name = "singlejar_port",
480 hdrs = ["java_tools/src/tools/singlejar/port.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700481 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700482 strip_include_prefix = "java_tools",
483 visibility = ["//visibility:private"],
484)
485
486cc_library(
487 name = "mapped_file",
iirinaebdbdcd2019-04-09 04:43:08 -0700488 srcs = ["java_tools/src/tools/singlejar/mapped_file.cc"],
489 hdrs = ["java_tools/src/tools/singlejar/mapped_file.h"] +
iirinab0317492019-04-29 09:26:43 -0700490 select({
491 ":windows": ["java_tools/src/tools/singlejar/mapped_file_windows.inc"],
492 "//conditions:default": ["java_tools/src/tools/singlejar/mapped_file_posix.inc"],
493 }),
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700494 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700495 strip_include_prefix = "java_tools",
iirinab0317492019-04-29 09:26:43 -0700496 visibility = ["//visibility:private"],
iirinae4ac6162019-04-08 01:37:20 -0700497 deps = [
iirinab0317492019-04-29 09:26:43 -0700498 ":cpp_util",
iirinae4ac6162019-04-08 01:37:20 -0700499 ":diag",
500 ":singlejar_port",
iirinae4ac6162019-04-08 01:37:20 -0700501 ],
502)
503
504cc_library(
505 name = "input_jar",
506 srcs = [
507 "java_tools/src/tools/singlejar/input_jar.cc",
508 ],
509 hdrs = [
510 "java_tools/src/tools/singlejar/input_jar.h",
511 "java_tools/src/tools/singlejar/zip_headers.h",
512 ],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700513 copts = SUPRESSED_WARNINGS,
iirinab0317492019-04-29 09:26:43 -0700514 strip_include_prefix = "java_tools",
iirinae4ac6162019-04-08 01:37:20 -0700515 deps = [
516 ":diag",
517 ":mapped_file",
518 ],
iirinae4ac6162019-04-08 01:37:20 -0700519)
520
521cc_library(
522 name = "options",
523 srcs = [
524 "java_tools/src/tools/singlejar/options.cc",
525 "java_tools/src/tools/singlejar/options.h",
526 ],
527 hdrs = ["java_tools/src/tools/singlejar/options.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700528 copts = SUPRESSED_WARNINGS,
iirinab0317492019-04-29 09:26:43 -0700529 strip_include_prefix = "java_tools",
iirinae4ac6162019-04-08 01:37:20 -0700530 deps = [
531 ":diag",
532 ":token_stream",
533 ],
iirinae4ac6162019-04-08 01:37:20 -0700534)
535
536cc_library(
537 name = "output_jar",
538 srcs = [
539 "java_tools/src/tools/singlejar/output_jar.cc",
540 "java_tools/src/tools/singlejar/output_jar.h",
541 ":zip_headers",
542 ],
543 hdrs = ["java_tools/src/tools/singlejar/output_jar.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700544 copts = SUPRESSED_WARNINGS,
iirinab0317492019-04-29 09:26:43 -0700545 strip_include_prefix = "java_tools",
iirinae4ac6162019-04-08 01:37:20 -0700546 deps = [
547 ":combiners",
iirinab0317492019-04-29 09:26:43 -0700548 ":cpp_util",
iirinae4ac6162019-04-08 01:37:20 -0700549 ":diag",
550 ":input_jar",
551 ":mapped_file",
552 ":options",
553 ":singlejar_port",
iirinae4ac6162019-04-08 01:37:20 -0700554 "//java_tools/zlib",
555 ],
iirinae4ac6162019-04-08 01:37:20 -0700556)
557
558cc_library(
559 name = "token_stream",
560 hdrs = ["java_tools/src/tools/singlejar/token_stream.h"],
Stephan Wolskif1bbe582019-08-27 00:58:23 -0700561 copts = SUPRESSED_WARNINGS,
iirinae4ac6162019-04-08 01:37:20 -0700562 strip_include_prefix = "java_tools",
iirinaf5a6ee12019-07-23 02:02:24 -0700563 deps = [
564 ":diag",
565 ":filesystem",
566 ],
iirinae4ac6162019-04-08 01:37:20 -0700567)
568
569filegroup(
570 name = "transient_bytes",
571 srcs = [
572 "java_tools/src/tools/singlejar/diag.h",
573 "java_tools/src/tools/singlejar/transient_bytes.h",
574 "java_tools/src/tools/singlejar/zlib_interface.h",
575 ":zip_headers",
576 ],
577)
578
579filegroup(
580 name = "zip_headers",
581 srcs = ["java_tools/src/tools/singlejar/zip_headers.h"],
582)
iirinaf50b8a42019-05-13 07:00:26 -0700583
iirinaf50b8a42019-05-13 07:00:26 -0700584################### Proguard ###################
585java_import(
586 name = "proguard_import",
587 jars = ["java_tools/third_party/java/proguard/proguard.jar"],
588)
589
590java_binary(
591 name = "proguard",
592 main_class = "proguard.ProGuard",
iirinaf50b8a42019-05-13 07:00:26 -0700593 visibility = ["//visibility:public"],
iirinaf5a6ee12019-07-23 02:02:24 -0700594 runtime_deps = [":proguard_import"],
iirinaf50b8a42019-05-13 07:00:26 -0700595)