Flag: --incompatible_java_common_parameters
Signature of java_common.compile is changed. Parameter host_javabase is removed.
Signature of java_common.pack_sources is changed. Parameters output_jar and host_javabase are removed.
Parameter host_javabase is not needed, because the value is passed together with java_toolchain argument.
Parameter output_jar was used to determine the name of resulting file, by replacing .jar to -src.jar in the file name. The resulting file of pack_sources can be specified directly using output_source_jar parameter.
Migration
Remove host_javabase argument from all invocations of java_common.compile and java_common.pack_sources.
In calls to java_common.pack_sources use output_source_jar parameter. For example:
+ source_jar_name = output_jar.basename[:-len(output_jar.extension)] + "-src.jar"
+ output_source_jar = ctx.actions.declare_file(source_jar_name, sibling = output_jar)
java_common.pack_sources(
actions,
- output_jar = output_jar,
+ output_source_jar = output_source_jar,
sources = sources,
source_jars = source_jars,
java_toolchain = java_toolchain,
- host_javabase = host_javabase,
)
The example shows how to translate old code to produce the same results, however there is often a nicer way to specify output_source_jar.
Flag:
--incompatible_java_common_parametersSignature of
java_common.compileis changed. Parameterhost_javabaseis removed.Signature of
java_common.pack_sourcesis changed. Parametersoutput_jarandhost_javabaseare removed.Parameter
host_javabaseis not needed, because the value is passed together withjava_toolchainargument.Parameter
output_jarwas used to determine the name of resulting file, by replacing.jarto-src.jarin the file name. The resulting file ofpack_sourcescan be specified directly usingoutput_source_jarparameter.Migration
Remove
host_javabaseargument from all invocations ofjava_common.compileandjava_common.pack_sources.In calls to
java_common.pack_sourcesuseoutput_source_jarparameter. For example:The example shows how to translate old code to produce the same results, however there is often a nicer way to specify
output_source_jar.