Record Class GradleLaunchConfig

java.lang.Object
java.lang.Record
net.neoforged.elc.configs.GradleLaunchConfig
Record Components:
tasks - An ordered list of gradle tasks that will be executed by this config.
workingDirectory - The working directory for the launch config.
gradleDistribution - The gradle distribution to use.
offlineMode - If offline mode is enabled or not.
showConsoleView - If the eclipse console will be shown when execution begins.
showExecutionView - If the eclipse "Gradle Executions" window will be shown when execution begins.
gradleUserHome - The gradle user home.
javaHome - The java home used by gradle.
arguments - Command-line arguments passed to the program (gradle, in this case) before execution.
jvmArguments - Command-line arguments passed to the JVM before startup.
overrideWorkspace - If the workspace settings are overridden. If false, most of the settings here are ignored. See GradleLaunchConfig.Keys.OVERRIDE_WORKSPACE.
All Implemented Interfaces:
LaunchConfig

public record GradleLaunchConfig(List<String> tasks, String workingDirectory, String gradleDistribution, boolean offlineMode, boolean showConsoleView, boolean showExecutionView, @Nullable String gradleUserHome, @Nullable String javaHome, List<String> arguments, List<String> jvmArguments, boolean overrideWorkspace) extends Record implements LaunchConfig
This class implements the org.eclipse.buildship.core.launch.runconfiguration launch configuration type.

It is used for launching one or more gradle tasks.

When executing this via LaunchGroup, it must always be run in LaunchGroup.Mode.RUN.

  • Constructor Details

    • GradleLaunchConfig

      public GradleLaunchConfig(List<String> tasks, String workingDirectory, String gradleDistribution, boolean offlineMode, boolean showConsoleView, boolean showExecutionView, @Nullable @Nullable String gradleUserHome, @Nullable @Nullable String javaHome, List<String> arguments, List<String> jvmArguments, boolean overrideWorkspace)
      Creates an instance of a GradleLaunchConfig record class.
      Parameters:
      tasks - the value for the tasks record component
      workingDirectory - the value for the workingDirectory record component
      gradleDistribution - the value for the gradleDistribution record component
      offlineMode - the value for the offlineMode record component
      showConsoleView - the value for the showConsoleView record component
      showExecutionView - the value for the showExecutionView record component
      gradleUserHome - the value for the gradleUserHome record component
      javaHome - the value for the javaHome record component
      arguments - the value for the arguments record component
      jvmArguments - the value for the jvmArguments record component
      overrideWorkspace - the value for the overrideWorkspace record component
  • Method Details

    • getType

      public String getType()
      Description copied from interface: LaunchConfig
      Returns the type name that corresponds to this launch config.
      Specified by:
      getType in interface LaunchConfig
    • bakeAttributes

      public List<EAttribute> bakeAttributes()
      Description copied from interface: LaunchConfig
      Serializes this launch configuration into E-Attribute form for LaunchConfig.write(Writer).
      Specified by:
      bakeAttributes in interface LaunchConfig
      Returns:
      A list containing all E-Attributes that make up this launch config.
    • builder

      public static GradleLaunchConfig.Builder builder(String project)
      Creates a new builder for a specific Eclipse project.
      Parameters:
      project - The name of the Eclipse project the launch config is for.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • tasks

      public List<String> tasks()
      Returns the value of the tasks record component.
      Returns:
      the value of the tasks record component
    • workingDirectory

      public String workingDirectory()
      Returns the value of the workingDirectory record component.
      Returns:
      the value of the workingDirectory record component
    • gradleDistribution

      public String gradleDistribution()
      Returns the value of the gradleDistribution record component.
      Returns:
      the value of the gradleDistribution record component
    • offlineMode

      public boolean offlineMode()
      Returns the value of the offlineMode record component.
      Returns:
      the value of the offlineMode record component
    • showConsoleView

      public boolean showConsoleView()
      Returns the value of the showConsoleView record component.
      Returns:
      the value of the showConsoleView record component
    • showExecutionView

      public boolean showExecutionView()
      Returns the value of the showExecutionView record component.
      Returns:
      the value of the showExecutionView record component
    • gradleUserHome

      @Nullable public @Nullable String gradleUserHome()
      Returns the value of the gradleUserHome record component.
      Returns:
      the value of the gradleUserHome record component
    • javaHome

      @Nullable public @Nullable String javaHome()
      Returns the value of the javaHome record component.
      Returns:
      the value of the javaHome record component
    • arguments

      public List<String> arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component
    • jvmArguments

      public List<String> jvmArguments()
      Returns the value of the jvmArguments record component.
      Returns:
      the value of the jvmArguments record component
    • overrideWorkspace

      public boolean overrideWorkspace()
      Returns the value of the overrideWorkspace record component.
      Returns:
      the value of the overrideWorkspace record component