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 org.gradle.api.provider.Provider<Set<org.gradle.jvm.toolchain.JavaLanguageVersion>> protected abstract org.gradle.api.model.ObjectFactoryfinal org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLanguageVersion> final 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 voidsetJavaCompiler(int value) 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()
-
-
Method Details
-
getObjectFactory
@Inject protected abstract org.gradle.api.model.ObjectFactory getObjectFactory() -
javaCompiler
public final org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLanguageVersion> javaCompiler() -
setJavaCompiler
public final void setJavaCompiler(int value) -
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() -
allJavaVersionsUsed
public final org.gradle.api.provider.Provider<Set<org.gradle.jvm.toolchain.JavaLanguageVersion>> allJavaVersionsUsed()
-