Interface RunConfiguration
- All Superinterfaces:
org.gradle.api.Named
- All Known Subinterfaces:
RunConfigurationInternal
- All Known Implementing Classes:
RunConfigSettings
This is used to configure how Minecraft is run, including JVM arguments, program arguments, environment variables, and the main class to run.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclient()Configure run config with the default client options.default voidConfigure run config with the default data options.default voiddata()Configure run config with the default data options.org.gradle.api.provider.Property<Boolean> Whether to append the project path to thegetDisplayName()whenprojectisn't the root project.org.gradle.api.provider.Property<String> The true entrypoint, this is usually dev launch injector.org.gradle.api.provider.Property<String> The full name of the run configuration, i.e.Environment variables to set when running the configuration.org.gradle.api.provider.Property<String> The Forge or NeoForge run configuration template applied to this run configuration.org.gradle.api.provider.Property<Boolean> When true a run configuration file will be generated for IDE's.org.gradle.api.provider.Property<String> Group this run config under the given folder.org.gradle.api.provider.ListProperty<String> Arguments for the JVM, such as system properties.org.gradle.api.provider.Property<String> The main class of the run configuration.org.gradle.api.NamedDomainObjectContainer<ModSettings> getMods()Returns a container of mod settings for this run configuration.org.gradle.api.provider.Property<Boolean> When true generated IDE run configurations will prefer to invoke the matching Gradle run task instead of launching the game directly, when that IDE supports such a mode.org.gradle.api.provider.ListProperty<String> Arguments for the program, usually Minecraft specific arguments.org.gradle.api.file.DirectoryPropertyThe run directory for this configuration, relative to the root project directory.org.gradle.api.provider.Property<String> The environment (or side) to run, usually client or server.org.gradle.api.provider.Property<String> The name of theSourceSetto use for the run configuration.System properties to set when running the configuration.default voidinherit(RunConfiguration parent) default voidmods(org.gradle.api.Action<org.gradle.api.NamedDomainObjectContainer<ModSettings>> action) Configures the mods of this run configuration.default voidserver()Configure run config with the default server options.default voidConfigure run config with the default data options.Methods inherited from interface org.gradle.api.Named
getName
-
Method Details
-
getDisplayName
org.gradle.api.provider.Property<String> getDisplayName()The full name of the run configuration, i.e. 'Minecraft Client'.By default this is determined from the base name.
Note: unless the project is the root project (or
getAppendProjectPathToDisplayName()is disabled), the project path will be appended automatically, e.g. 'Minecraft Client (:some:project)'. -
getJvmArguments
org.gradle.api.provider.ListProperty<String> getJvmArguments()Arguments for the JVM, such as system properties. -
getProgramArguments
org.gradle.api.provider.ListProperty<String> getProgramArguments()Arguments for the program, usually Minecraft specific arguments. -
getEnvironmentVars
Environment variables to set when running the configuration. -
getSystemProperties
System properties to set when running the configuration. -
getRuntimeEnvironment
org.gradle.api.provider.Property<String> getRuntimeEnvironment()The environment (or side) to run, usually client or server. -
getAppendProjectPathToDisplayName
org.gradle.api.provider.Property<Boolean> getAppendProjectPathToDisplayName()Whether to append the project path to thegetDisplayName()whenprojectisn't the root project.Warning: could produce ambiguous run config names if disabled, unless used carefully in conjunction with
getDisplayName(). -
getMainClass
org.gradle.api.provider.Property<String> getMainClass()The main class of the run configuration. -
getSourceSet
org.gradle.api.provider.Property<String> getSourceSet()The name of theSourceSetto use for the run configuration. -
getRunDirectory
org.gradle.api.file.DirectoryProperty getRunDirectory()The run directory for this configuration, relative to the root project directory. -
getGenerateRunConfig
org.gradle.api.provider.Property<Boolean> getGenerateRunConfig()When true a run configuration file will be generated for IDE's.By default only run configs on the root project will be generated.
-
getPreferGradleTask
org.gradle.api.provider.Property<Boolean> getPreferGradleTask()When true generated IDE run configurations will prefer to invoke the matching Gradle run task instead of launching the game directly, when that IDE supports such a mode.For example, the
clientrun configuration will run:runClient.Changing this mode may cause an existing generated run configuration to be replaced so the IDE switches to the correct run configuration type.
-
getIdeConfigFolder
org.gradle.api.provider.Property<String> getIdeConfigFolder()Group this run config under the given folder.This is currently only supported on IntelliJ IDEA.
- Returns:
- The property used to set the config folder.
-
getDevLaunchMainClass
The true entrypoint, this is usually dev launch injector. This should not be changed unless you know what you are doing. -
inherit
-
client
default void client()Configure run config with the default client options. -
server
default void server()Configure run config with the default server options. -
getForgeTemplate
org.gradle.api.provider.Property<String> getForgeTemplate()The Forge or NeoForge run configuration template applied to this run configuration. -
data
default void data()Configure run config with the default data options.This method can only be used on Forge and NeoForge.
-
clientData
@Experimental default void clientData()Configure run config with the default data options.This method can only be used on NeoForge.
-
serverData
@Experimental default void serverData()Configure run config with the default data options.This method can only be used on NeoForge.
-
getMods
org.gradle.api.NamedDomainObjectContainer<ModSettings> getMods()Returns a container of mod settings for this run configuration.If non-empty, this container will override the global container declared in the
loomextension.This method is currently only available on Forge and NeoForge.
- Returns:
- a container of mod settings for this run configuration
-
mods
default void mods(org.gradle.api.Action<org.gradle.api.NamedDomainObjectContainer<ModSettings>> action) Configures the mods of this run configuration.This method is currently only available on Forge.
-