java_agent

java_agent(name, additional_jar_manifest_attributes, can_redefine_classes, can_retransform_classes,
           can_set_native_method_prefix, deps, premain_class, srcs)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
additional_jar_manifest_attributes A list of strings; each will be added as a line of the output JAR’s manifest file. List of strings optional []
can_redefine_classes - Boolean optional False
can_retransform_classes - Boolean optional False
can_set_native_method_prefix - Boolean optional False
deps - List of labels optional []
premain_class - String required
srcs A list of Java source files whose derived class files should be included in this Java agent (and any of its dependents). List of labels optional []

java_binary

java_binary(name, additional_jar_manifest_attributes, deps, java_agents, main_class, srcs)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
additional_jar_manifest_attributes A list of strings; each will be added as a line of the output JAR’s manifest file. The JAR’s Main-Class header is automatically set according to the target’s main_class attribute. List of strings optional []
deps - List of labels optional []
java_agents A dict from java_agent targets to option strings. Each key is a java_agent target (i.e. a target which provides both JavaAgentInfo and JavaDependencyInfo) with which this target should be run; each value is an option string to be passed to that Java agent. Dictionary: Label -> String optional {}
main_class - String required
srcs A list of Java source files whose derived class files should be included in this binary (and any of its dependents). List of labels optional []

java_import

java_import(name, jars)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
jars - List of labels required

java_library

java_library(name, additional_jar_manifest_attributes, deps, srcs)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
additional_jar_manifest_attributes A list of strings; each will be added as a line of the output JAR’s manifest file. List of strings optional []
deps - List of labels optional []
srcs A list of Java source files whose derived class files should be included in this library (and any of its dependents). List of labels optional []

java_test

java_test(name, additional_jar_manifest_attributes, deps, java_agents, main_class, srcs)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
additional_jar_manifest_attributes A list of strings; each will be added as a line of the output JAR’s manifest file. The JAR’s Main-Class header is automatically set according to the target’s main_class attribute. List of strings optional []
deps - List of labels optional []
java_agents A dict from java_agent targets to strings. Each key is a java_agent target with which this target should be run; each value is an option string to be passed to that Java agent. Dictionary: Label -> String optional {}
main_class - String required
srcs A list of Java source files whose derived class files should be included in this test (and any of its dependents). List of labels optional []

legacy_java_import

legacy_java_import(name, imports)

Wraps legacy Java targets (i.e. those providing JavaInfo but not JavaDependencyInfo) so that they can be used as a dependency of these new Java rules.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
imports - List of labels required