Interface KotlinJavaToolchain.JdkSetter

  • All Implemented Interfaces:

    
    public interface KotlinJavaToolchain.JdkSetter
    
                        

    Provides methods to configure the task using an explicit JDK location.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit use(File jdkHomeLocation, JavaVersion jdkVersion) Configures the JVM toolchain to use the JDK located under the jdkHomeLocation absolute path.
      Unit use(String jdkHomeLocation, Object jdkVersion) Configures the JVM toolchain to use the JDK located under the jdkHomeLocation absolute path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • use

         abstract Unit use(File jdkHomeLocation, JavaVersion jdkVersion)

        Configures the JVM toolchain to use the JDK located under the jdkHomeLocation absolute path. The major JDK version from javaVersion is used as a task input so that Gradle avoids using task outputs in the build cache that use different JDK versions.

        Note: The project build fails if the JRE version instead of the JDK version is provided.

        Parameters:
        jdkHomeLocation - The path to the JDK location on the machine
        jdkVersion - The JDK version located in the configured jdkHomeLocation path
      • use

         Unit use(String jdkHomeLocation, Object jdkVersion)

        Configures the JVM toolchain to use the JDK located under the jdkHomeLocation absolute path. The major JDK version from javaVersion is used as a task input so that Gradle avoids using task outputs in the build cache that use different JDK versions.

        Note: The project build fails if the JRE version instead of the JDK version is provided.

        Parameters:
        jdkHomeLocation - The path to the JDK location on the machine
        jdkVersion - JDK version located in the configured jdkHomeLocation path.