Class BaselineJavaVersionExtension
java.lang.Object
com.palantir.baseline.plugins.javaversions.BaselineJavaVersionExtension
Extension named
javaVersion used to set the
target and runtime java versions used for a single project.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidlibrary()final org.gradle.api.provider.Property<Boolean>Overrides auto-detection if a value is present to force this module to be a library (true) or a distributionfalse).final org.gradle.api.provider.Property<ChosenJavaVersion>runtime()RuntimeChosenJavaVersionfor testing and distributions.final voidsetRuntime(int value) final voidsetRuntime(String value) final voidsetTarget(int value) final voidfinal org.gradle.api.provider.Property<ChosenJavaVersion>target()TargetChosenJavaVersionfor compilation.
-
Constructor Details
-
BaselineJavaVersionExtension
@Inject public BaselineJavaVersionExtension(org.gradle.api.Project project)
-
-
Method Details
-
target
TargetChosenJavaVersionfor compilation. Also determines whether the `--enable-preview` flag should be used for compilation, producing bytecode with a minor version of '65535'. Unlike normal bytecode, this bytecode cannot be run by a higher version of Java that it was compiled by. -
setTarget
public final void setTarget(int value) -
setTarget
-
runtime
RuntimeChosenJavaVersionfor testing and distributions. -
setRuntime
public final void setRuntime(int value) -
setRuntime
-
overrideLibraryAutoDetection
Overrides auto-detection if a value is present to force this module to be a library (true) or a distributionfalse). -
library
public final void library()
-