Package net.neoforged.moddevgradle.dsl
Class RunModel
java.lang.Object
net.neoforged.moddevgradle.dsl.RunModel
- All Implemented Interfaces:
org.gradle.api.artifacts.dsl.Dependencies,org.gradle.api.Named
public abstract class RunModel
extends Object
implements org.gradle.api.Named, org.gradle.api.artifacts.dsl.Dependencies
Model of a run. Each run will generate a corresponding IDE run and
runXxx gradle task.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclient()Equivalent to settingtype = "client".voiddata()Equivalent to settingtype = "data".voidenvironment(String key, String value) Shorthand to set a single environment variable.org.gradle.api.artifacts.ConfigurationAdditional environment variables.abstract org.gradle.api.file.DirectoryPropertyDirectory that the game will run in.abstract org.gradle.api.provider.Property<String>Name for the run configuration in the IDE.abstract org.gradle.api.provider.ListProperty<String>Additional JVM arguments to be added to the run configuration.abstract org.gradle.api.provider.Property<org.slf4j.event.Level>Changes the games log-level.abstract org.gradle.api.provider.Property<String>Allows overriding the main class for this run.abstract org.gradle.api.provider.SetProperty<ModModel>getMods()The mods for this run.getName()abstract org.gradle.api.provider.ListProperty<String>Additional program arguments to add to the run configuration.abstract org.gradle.api.provider.Property<org.gradle.api.tasks.SourceSet>Sets the source set to be used as the main classpath of this run.Additional system properties to add to the JVM arguments.List<org.gradle.api.tasks.TaskProvider<?>>Gets the Gradle tasks that should be run before running this run.abstract org.gradle.api.provider.Property<String>getType()Sets the run configuration type from NeoForge that should be used.voidjvmArgument(String arg) Shorthand to add a single JVM argument.voidprogramArgument(String arg) Shorthand to add a single program argument.voidserver()Equivalent to settingtype = "server".voidsetTasksBefore(List<org.gradle.api.tasks.TaskProvider<?>> taskNames) Sets the Gradle tasks that should be run before running this run.voidsystemProperty(String key, String value) Shorthand to set a single system property.voidtaskBefore(org.gradle.api.Task task) Configures the given Task to be run before launching the game.voidtaskBefore(org.gradle.api.tasks.TaskProvider<?> task) Configures the given Task to be run before launching the game.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gradle.api.artifacts.dsl.Dependencies
constraint, constraint, constraint, constraint, getDependencyConstraintFactory, getDependencyFactory, getObjectFactory, getProject, module, module, project, project
-
Constructor Details
-
RunModel
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.gradle.api.Named
-
getIdeName
Name for the run configuration in the IDE. -
getGameDirectory
public abstract org.gradle.api.file.DirectoryProperty getGameDirectory()Directory that the game will run in. Defaults torun/. -
getEnvironment
Additional environment variables. -
environment
Shorthand to set a single environment variable. -
getSystemProperties
Additional system properties to add to the JVM arguments. -
systemProperty
Shorthand to set a single system property. -
getMainClass
Allows overriding the main class for this run. -
getProgramArguments
Additional program arguments to add to the run configuration. -
programArgument
Shorthand to add a single program argument. -
getJvmArguments
Additional JVM arguments to be added to the run configuration. -
jvmArgument
Shorthand to add a single JVM argument. -
getMods
The mods for this run. Defaults to all mods registered in the project.- See Also:
-
getType
Sets the run configuration type from NeoForge that should be used. -
client
public void client()Equivalent to settingtype = "client". -
data
public void data()Equivalent to settingtype = "data". -
server
public void server()Equivalent to settingtype = "server". -
getTasksBefore
Gets the Gradle tasks that should be run before running this run. -
setTasksBefore
Sets the Gradle tasks that should be run before running this run. This also slows down running through your IDE since it will first execute Gradle to run the requested tasks, and then run the actual game. -
taskBefore
public void taskBefore(org.gradle.api.tasks.TaskProvider<?> task) Configures the given Task to be run before launching the game. This also slows down running through your IDE since it will first execute Gradle to run the requested tasks, and then run the actual game. -
taskBefore
public void taskBefore(org.gradle.api.Task task) Configures the given Task to be run before launching the game. This also slows down running through your IDE since it will first execute Gradle to run the requested tasks, and then run the actual game. -
getAdditionalRuntimeClasspathConfiguration
public org.gradle.api.artifacts.Configuration getAdditionalRuntimeClasspathConfiguration() -
getLogLevel
public abstract org.gradle.api.provider.Property<org.slf4j.event.Level> getLogLevel()Changes the games log-level. -
getSourceSet
public abstract org.gradle.api.provider.Property<org.gradle.api.tasks.SourceSet> getSourceSet()Sets the source set to be used as the main classpath of this run. Defaults to themainsource set. Eclipse does not support having multiple different classpaths per project beyond a separate unit-testing classpath. -
toString
-