Members
BootClassPathInfo
compile
Parameters
ParameterDescriptionctxctx;
required
The rule context.
source_jarssequence of File s;
default is []
A list of the jars to be compiled. At least one of source_jars or source_files should be specified.
source_filessequence of File s;
default is []
A list of the Java source files to be compiled. At least one of source_jars or source_files should be specified.
outputFile;
required
output_source_jarFile; or None;
default is None
The output source jar. Defaults to {output_jar}-src.jar if unset.
javac_optssequence of string s;
default is []
A list of the desired javac options.
depssequence of struct s;
default is []
A list of dependencies.
runtime_depssequence of struct s;
default is []
A list of runtime dependencies.
exportssequence of struct s;
default is []
A list of exports.
pluginssequence of struct s; or sequence of struct s;
default is []
A list of plugins.
exported_pluginssequence of struct s; or sequence of struct s;
default is []
A list of exported plugins.
native_librariessequence of CcInfo s;
default is []
CC native library dependencies that are needed for this library.
annotation_processor_additional_inputssequence of File s;
default is []
A list of inputs that the Java compilation action will take in addition to the Java sources for annotation processing.
annotation_processor_additional_outputssequence of File s;
default is []
A list of outputs that the Java compilation action will output in addition to the class jar from annotation processing.
strict_depsstring;
default is 'ERROR'
A string that specifies how to handle strict deps. Possible values: ‘OFF’, ‘ERROR’, ‘WARN’ and ‘DEFAULT’. For more details see --strict_java_deps flag . By default 'ERROR'. ``java_toolchain
Info;
required
A JavaToolchainInfo to be used for this compilation. Mandatory.
bootclasspath
default is None
A BootClassPathInfo to be used for this compilation. If present, overrides the bootclasspath associated with the provided java_toolchain.
sourcepathsequence of File s;
default is []
resourcessequence of File s;
default is []
resource_jarssequence of File s;
default is []
classpath_resourcessequence of File s;
default is []
neverlinkbool;
default is False
enable_annotation_processingbool;
default is True
Disables annotation processing in this compilation, causing any annotation processors provided in plugins or in exported_plugins of deps to be ignored.
enable_compile_jar_actionbool;
default is True
Enables header compilation or ijar creation. If set to False, it forces use of the full class jar in the compilation classpaths of any dependants. Doing so is intended for use by non-library targets such as binaries that do not have dependants.
add_exportssequence of string s;
default is []
Allow this library to access the given /.
add_openssequence of string s;
default is []
Allow this library to reflectively access the given /.
JavaRuntimeInfo
JavaToolchainInfo
merge
Parameters
ParameterDescriptionproviderssequence of struct s;
required
The list of providers to merge.
pack_sources
JavaInfo#source_jar
.At least one of parameters output_jar or output_source_jar is required.
Parameters
ParameterDescriptionactionsactions;
required
ctx.actions
output_source_jarFile; or None;
default is None
The output source jar.
sourcessequence of File s;
default is []
A list of Java source files to be packed into the source jar.
source_jarssequence of File s;
default is []
A list of source jars to be packed into the source jar.
java_toolchain
Info;
required
A JavaToolchainInfo to used to find the ijar tool.
run_ijar
JavaInfo#compile_jar.
Parameters
ParameterDescriptionactionsactions;
required
ctx.actions
jarFile;
required
The jar to run ijar on.
target_labelLabel; or None;
default is None
A target label to stamp the jar with. Used for add_dep support. Typically, you would pass ctx.label to stamp the jar with the current rule’s label.
java_toolchain
Info;
required
A JavaToolchainInfo to used to find the ijar tool.
stamp_jar
add_dep support. The return value is typically passed to JavaInfo#compile_jar. Prefer to use run_ijar when possible.
Parameters
ParameterDescriptionactionsactions;
required
ctx.actions
jarFile;
required
The jar to run stamp_jar on.
target_labelLabel;
required
A target label to stamp the jar with. Used for add_dep support. Typically, you would pass ctx.label to stamp the jar with the current rule’s label.
java_toolchain
Info;
required
A JavaToolchainInfo to used to find the stamp_jar tool.