Class GradleToolchainUtil

java.lang.Object
net.mcreator.gradle.GradleToolchainUtil

public class GradleToolchainUtil extends Object
  • Constructor Details

    • GradleToolchainUtil

      public GradleToolchainUtil()
  • Method Details

    • getToolchainJavaHome

      @Nullable public static File getToolchainJavaHome(GeneratorConfiguration generatorConfiguration, org.gradle.tooling.ProjectConnection projectConnection, @Nullable org.gradle.tooling.model.eclipse.EclipseProject fallbackProject)
      Attempts to determine the Java home directory used by the toolchain in a Gradle project. If the toolchain Java home cannot be determined, it falls back to checking the provided Eclipse project, if available.
      Parameters:
      generatorConfiguration - the configuration object used to configure the Gradle launcher.
      projectConnection - the connection to the Gradle project.
      fallbackProject - an optional Eclipse project to use as a fallback for determining the Java home in case the toolchain Java home cannot be resolved.
      Returns:
      the file path representing the Java home directory used by the toolchain if found, or null if no suitable Java home could be determined.