Class AbstractProductionRunTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
net.fabricmc.loom.task.AbstractLoomTask
net.fabricmc.loom.task.prod.AbstractProductionRunTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>
Direct Known Subclasses:
ClientProductionRunTask, ServerProductionRunTask

@Experimental @UntrackedTask(because="Always rerun this task.") public abstract sealed class AbstractProductionRunTask extends AbstractLoomTask permits ClientProductionRunTask, ServerProductionRunTask
This is the base task for running the game in a "production" like environment. Using intermediary names, and not enabling development only features.

Do not use this task directly, use ClientProductionRunTask or ServerProductionRunTask instead.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    configureClasspath(org.gradle.process.ExecSpec exec)
     
    protected void
    configureCommand(org.gradle.process.ExecSpec exec)
     
    protected void
    configureJvmArgs(org.gradle.process.ExecSpec exec)
     
    protected void
    configureMainClass(org.gradle.process.ExecSpec exec)
     
    protected void
    configureProgramArgs(org.gradle.process.ExecSpec exec)
     
    protected org.gradle.api.provider.Provider<org.gradle.api.artifacts.Configuration>
    detachedConfigurationProvider(String mavenNotation, org.gradle.api.provider.Provider<String> versionProvider)
     
    protected abstract org.gradle.api.file.ConfigurableFileCollection
     
    protected abstract org.gradle.process.ExecOperations
     
    abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher>
    The JavaLauncher to use when running the game, this can be used to specify a specific Java version to use.
    protected abstract org.gradle.jvm.toolchain.JavaToolchainService
     
    abstract org.gradle.api.provider.ListProperty<String>
    A list of additional JVM arguments to pass to the game.
    protected abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.file.ConfigurableFileCollection
    A collection of mods that will be used when running the game.
    abstract org.gradle.api.provider.ListProperty<String>
    A list of additional program arguments to pass to the game.
    protected org.gradle.api.provider.Provider<String>
     
    abstract org.gradle.api.file.DirectoryProperty
    The directory to run the game in.
    void
    run()
     
    protected Stream<File>
     

    Methods inherited from class net.fabricmc.loom.task.AbstractLoomTask

    getExtension, getModPlatform

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • AbstractProductionRunTask

      @Inject public AbstractProductionRunTask()
  • Method Details

    • getMods

      @Classpath public abstract org.gradle.api.file.ConfigurableFileCollection getMods()
      A collection of mods that will be used when running the game. The mods must be remapped to run with intermediary names.

      By default this includes the remapped jar.

    • getJvmArgs

      @Input public abstract org.gradle.api.provider.ListProperty<String> getJvmArgs()
      A list of additional JVM arguments to pass to the game.
    • getProgramArgs

      @Input public abstract org.gradle.api.provider.ListProperty<String> getProgramArgs()
      A list of additional program arguments to pass to the game.
    • getRunDir

      @OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getRunDir()
      The directory to run the game in.
    • getJavaLauncher

      public abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()
      The JavaLauncher to use when running the game, this can be used to specify a specific Java version to use.

      See: Java Toolchains

      Returns:
    • getClasspath

      @Internal @Classpath protected abstract org.gradle.api.file.ConfigurableFileCollection getClasspath()
    • getMainClass

      @Internal @Input protected abstract org.gradle.api.provider.Property<String> getMainClass()
    • getExecOperations

      @Inject protected abstract org.gradle.process.ExecOperations getExecOperations()
    • getJavaToolchainService

      @Inject protected abstract org.gradle.jvm.toolchain.JavaToolchainService getJavaToolchainService()
    • run

      public void run() throws IOException
      Throws:
      IOException
    • configureCommand

      protected void configureCommand(org.gradle.process.ExecSpec exec)
    • configureJvmArgs

      protected void configureJvmArgs(org.gradle.process.ExecSpec exec)
    • streamClasspath

      protected Stream<File> streamClasspath()
    • configureClasspath

      protected void configureClasspath(org.gradle.process.ExecSpec exec)
    • configureMainClass

      protected void configureMainClass(org.gradle.process.ExecSpec exec)
    • configureProgramArgs

      protected void configureProgramArgs(org.gradle.process.ExecSpec exec)
    • getProjectLoaderVersion

      @Internal protected org.gradle.api.provider.Provider<String> getProjectLoaderVersion()
    • detachedConfigurationProvider

      protected org.gradle.api.provider.Provider<org.gradle.api.artifacts.Configuration> detachedConfigurationProvider(String mavenNotation, org.gradle.api.provider.Provider<String> versionProvider)