-
Notifications
You must be signed in to change notification settings - Fork 90
/
BUILD
51 lines (44 loc) · 1.82 KB
/
BUILD
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
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//tools:maven.bzl", "pom_file")
load(":builddefs.bzl", "java_agent_binary")
licenses(["notice"])
exports_files(
["builddefs.bzl"],
)
java_agent_binary(
srcs = [],
deploy_jar_name = "allocationinstrumenteragent_deploy.jar",
library_name = "allocationinstrumenter",
premain_class = "com.google.monitoring.runtime.instrumentation.AllocationInstrumenter",
deps = [
"//src/main/java/com/google/monitoring/runtime/instrumentation:allocation_instrumenter",
"//src/main/java/com/google/monitoring/runtime/instrumentation:sampler",
"//src/main/java/com/google/monitoring/runtime/instrumentation:staticclasswriter",
],
)
pom_file(
name = "pom",
targets = [":allocationinstrumenter"],
)
# Since some Java applications use different versions of ASM, we
# use JarJar to rename the ASM classes to something else, to avoid conflicts.
#
# Note that Flogger injection classes must not be renamed, because some injection strategies need
# the classes in the agent library to share information with the runtime library. This is safe
# however because none of the Flogger library itself is in the agent JAR, only the injection
# classes. We specify the entire "flogger" package as "non shaded" to mitigate the risk that the
# agent package (which is the only thing we actually care about) is ever renamed, as this would
# otherwise break log site injection in a very hard to understand way. Sadly there's no ability to
# add comments to the rules.txt files explaining this there.
filegroup(
name = "jarjar_rules",
srcs = ["rules.txt"],
)
filegroup(
name = "bootstrap",
srcs = ["//src/main/java/com/google/monitoring/runtime/instrumentation:Bootstrap.java.in"],
)
bzl_library(
name = "builddefs_bzl",
srcs = ["builddefs.bzl"],
)