forked from googleapis/sdk-platform-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
52 lines (47 loc) · 1.94 KB
/
BUILD.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
load("@rules_java//java:defs.bzl", "java_binary", "java_proto_library")
package(default_visibility = ["//visibility:public"])
java_binary(
name = "protoc-gen-java_gapic",
main_class = "com.google.api.generator.Main",
runtime_deps = ["@maven//:com_google_api_gapic_generator_java"],
)
# Request dumper binary, which dumps the CodeGeneratorRequest to a file on disk
# which will be identical to the one passed to the protoc-gen-java_gapic during
# normal execution. The dumped file then can be used to run this gapic-generator
# directly (instead of relying on protoc to start the process), which would give
# much greater flexibility in terms of debugging features, like attaching a
# debugger, easier work with stdout and stderr etc.
#
# Usage example, via the rule in a corresponding BUILD.bazel file:
#
# load("@gapic_generator_java//rules_java_gapic:java_gapic.bzl", "java_generator_request_dump")
# java_generator_request_dump(
# name = "compute_small_request_dump",
# srcs = [":compute_small_proto_with_info"],
# transport = "rest",
# )
#
java_binary(
name = "protoc-gen-code_generator_request_dumper",
main_class = "com.google.api.generator.debug.CodeGeneratorRequestDumper",
runtime_deps = ["@maven//:com_google_api_gapic_generator_java"],
)
# A binary similar to protoc-gen-java_gapic but reads the CodeGeneratorRequest
# directly from a file instead of relying on protoc to pipe it in.
#
# Usage example:
#
# bazel run code_generator_request_file_to_gapic_main desc-dump.bin dump.jar
#
java_binary(
name = "code_generator_request_file_to_gapic_main",
main_class = "com.google.api.generator.debug.CodeGeneratorRequestFileToGapicMain",
runtime_deps = ["@maven//:com_google_api_gapic_generator_java"],
)
# google-java-format
java_binary(
name = "google_java_format_binary",
jvm_flags = ["-Xmx512m"],
main_class = "com.google.googlejavaformat.java.Main",
runtime_deps = ["@google_java_format_all_deps//jar"],
)