Class BaselineJavaVersionExtension

java.lang.Object
com.palantir.baseline.plugins.javaversions.BaselineJavaVersionExtension

public abstract class BaselineJavaVersionExtension extends Object
Extension named javaVersion used to set the target and runtime java versions used for a single project.
  • 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

      public final org.gradle.api.provider.Property<ChosenJavaVersion> target()
      Target ChosenJavaVersion for 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

      public final void setTarget(String value)
    • runtime

      public final org.gradle.api.provider.Property<ChosenJavaVersion> runtime()
      Runtime ChosenJavaVersion for testing and distributions.
    • setRuntime

      public final void setRuntime(int value)
    • setRuntime

      public final void setRuntime(String value)
    • overrideLibraryAutoDetection

      public final org.gradle.api.provider.Property<Boolean> overrideLibraryAutoDetection()
      Overrides auto-detection if a value is present to force this module to be a library (true) or a distribution false).
    • library

      public final void library()
    • allJavaVersionsUsed

      public final org.gradle.api.provider.Provider<Set<org.gradle.jvm.toolchain.JavaLanguageVersion>> allJavaVersionsUsed()