Define --java_runtime_version, --tool_java_runtime_version,
java_language_version, and --tool_java_language_version
@@ -610,6 +610,38 @@ public class JavaOptions extends FragmentOptions {
help = "If enabled, turbine is used for all annotation processing")
public boolean experimentalTurbineAnnotationProcessing;
+ @Option(
+ name = "java_runtime_version",
+ defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "The Java runtime version")
+ public String javaRuntimeVersion;
+
+ @Option(
+ name = "tool_java_runtime_version",
+ defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "The Java runtime version used to execute tools during the build")
+ public String hostJavaRuntimeVersion;
+
+ @Option(
+ name = "java_language_version",
+ defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "The Java language version")
+ public String javaLanguageVersion;
+
+ @Option(
+ name = "tool_java_language_version",
+ defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "The Java language version used to build tools that are executed during a build")
+ public String hostJavaLanguageVersion;
+
Label defaultJavaBase() {
return Label.parseAbsoluteUnchecked(DEFAULT_JAVABASE);
}
@@ -669,11 +701,16 @@ public class JavaOptions extends FragmentOptions {
host.disallowResourceJars = disallowResourceJars;
host.loadJavaRulesFromBzl = loadJavaRulesFromBzl;
+ host.javaRuntimeVersion = hostJavaRuntimeVersion;
+ host.javaLanguageVersion = hostJavaLanguageVersion;
+
// Save host options for further use.
host.hostJavaBase = hostJavaBase;
host.hostJavacOpts = hostJavacOpts;
host.hostJavaLauncher = hostJavaLauncher;
host.hostJavaToolchain = hostJavaToolchain;
+ host.hostJavaRuntimeVersion = hostJavaRuntimeVersion;
+ host.hostJavaLanguageVersion = hostJavaLanguageVersion;
host.experimentalTurbineAnnotationProcessing = experimentalTurbineAnnotationProcessing;
