Skip to main content
A provider encapsulating information about Java and Java-like targets.

Members

Whether this library should be used only for compilation and not at runtime.

annotation_processing

Returns information about annotation processors applied on this Java/Java-like target. Deprecated: Please use plugins instead (which returns information about annotation processors to be applied by consuming targets). May return None.

api_generating_plugins

Returns data about API generating plugins defined or exported by this target. Those annotation processors are applied to a Java target before producing its header jars (which contain method signatures). When no API plugins are present, header jars are generated from the sources, reducing critical path. The api_generating_plugins is a subset of plugins.

compilation_info

Returns compilation information for this Java/Java-like target. May return None.

compile_jars

Returns the Jars required by this target directly at compile time. They can be interface jars (ijar or hjar), regular jars or both, depending on whether rule implementations chose to create interface jars or not.

full_compile_jars

Returns the regular, full compile time Jars required by this target directly. They can be
  • the corresponding regular Jars of the interface Jars returned by JavaInfo.compile_jars
  • the regular (full) Jars returned by JavaInfo.compile_jars
Note: JavaInfo.compile_jars can return a mix of interface Jars and regular Jars. Only use this method if interface Jars don’t work with your rule set(s) (e.g. some Scala targets) If you’re working with Java-only targets it’s preferable to use interface Jars via JavaInfo.compile_jars

header_compilation_direct_deps

Returns the direct dependencies of the header compilation action.

java_outputs

Returns information about outputs of this Java/Java-like target.

module_flags_info

Returns the Java module flag configuration.

outputs

Returns information about outputs of this Java/Java-like target. Deprecated: use java_outputs. May return None.

plugins

Returns data about all plugins that a consuming target should apply. This is typically either a java_plugin itself or a java_library exporting one or more plugins. A java_library runs annotation processing with all plugins from this field appearing in deps and plugins attributes.

runtime_output_jars

Returns a list of runtime Jars created by this Java/Java-like target.

source_jars

Returns a list of Jars with all the source files (including those generated by annotations) of the target itself, i.e. NOT including the sources of the transitive dependencies.

transitive_compile_time_jars

Returns the transitive set of Jars required to build the target.Note: for binary targets (such as java_binary and java_test), this is empty, since such targets are not intended to be dependencies of other Java targets.

transitive_native_libraries

Returns the transitive set of CC native libraries required by the target.

transitive_runtime_jars

Returns a transitive set of Jars required on the target’s runtime classpath.Note: for binary targets (such as java_binary and java_test), this is empty, since such targets are not intended to be dependencies of other Java targets.

transitive_source_jars

Returns the Jars containing source files of the current target and all of its transitive dependencies.