Interface MinecraftExtension.ForProject

All Superinterfaces:
MinecraftExtension
Enclosing interface:
MinecraftExtension

public static sealed interface MinecraftExtension.ForProject extends MinecraftExtension
Project-specific additions for the Minecraft extension. These will be accessible from the minecraft DSL object within your project's buildscript.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraftforge.gradle.MinecraftExtension

    MinecraftExtension.Attributes, MinecraftExtension.ForProject, MinecraftExtension.Mappings
  • Field Summary

    Fields inherited from interface net.minecraftforge.gradle.MinecraftExtension

    attributes, NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Configures the AccessTransformer options for this project.
    default void
    accessTransformer(org.gradle.api.Action<? super net.minecraftforge.accesstransformers.gradle.AccessTransformersContainer.Options> options)
    Configures the AccessTransformer options for this project.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(Object value)
    Creates (or marks if existing) the given dependency as a Minecraft dependency.
    org.gradle.api.artifacts.ExternalModuleDependency
    dep(Object value, Closure closure)
    Creates (or marks if existing) the given dependency as a Minecraft dependency and configures it with the given closure.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(Object value, org.gradle.api.Action<? super org.gradle.api.artifacts.ExternalModuleDependency> action)
    Creates (or marks if existing) the given dependency as a Minecraft dependency and applies the given action to it.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(org.gradle.api.provider.Provider<?> value)
    Creates (or marks if existing) the given dependency as a Minecraft dependency.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(org.gradle.api.provider.Provider<?> value, Closure closure)
    Creates (or marks if existing) the given dependency as a Minecraft dependency and configures it with the given closure.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(org.gradle.api.provider.Provider<?> value, org.gradle.api.Action<? super org.gradle.api.artifacts.ExternalModuleDependency> action)
    Creates (or marks if existing) the given dependency as a Minecraft dependency and applies the given action to it.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(org.gradle.api.provider.ProviderConvertible<?> value)
    Creates (or marks if existing) the given dependency as a Minecraft dependency.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(org.gradle.api.provider.ProviderConvertible<?> value, Closure closure)
    Creates (or marks if existing) the given dependency as a Minecraft dependency and configures it with the given closure.
    default org.gradle.api.artifacts.ExternalModuleDependency
    dep(org.gradle.api.provider.ProviderConvertible<?> value, org.gradle.api.Action<? super org.gradle.api.artifacts.ExternalModuleDependency> action)
    Creates (or marks if existing) the given dependency as a Minecraft dependency and applies the given action to it.
    org.gradle.api.NamedDomainObjectContainer<SlimeLauncherOptions>
    The collection of Slime Launcher options with which to create the launcher tasks.
    void
    runs(Closure<Void> closure)
    Configures the Slime Launcher options for this project, which will be used to create the launcher tasks.
    default void
    runs(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<SlimeLauncherOptions>> action)
    Configures the Slime Launcher options for this project, which will be used to create the launcher tasks.
    void
    Sets the AccessTransformer configuration to use.
    void
    Sets the AccessTransformer configuration to use.
    void
    setAccessTransformer(org.gradle.api.file.RegularFile configFile)
    Sets the AccessTransformer configuration to use.
    void
    setAccessTransformer(org.gradle.api.provider.Provider<?> configFile)
    Sets the AccessTransformer configuration to use.

    Methods inherited from interface net.minecraftforge.gradle.MinecraftExtension

    getMappings, getMaven, mappings, mappings, maven
  • Method Details

    • setAccessTransformer

      void setAccessTransformer(org.gradle.api.file.RegularFile configFile)
      Sets the AccessTransformer configuration to use.
      Parameters:
      configFile - The configuration file to use
    • setAccessTransformer

      void setAccessTransformer(File configFile)
      Sets the AccessTransformer configuration to use.
      Parameters:
      configFile - The configuration file to use
    • setAccessTransformer

      void setAccessTransformer(Object configFile)

      Sets the AccessTransformer configuration to use.

      The given object is resolved using Project.file(Object).

      Parameters:
      configFile - The configuration file to use
    • setAccessTransformer

      void setAccessTransformer(org.gradle.api.provider.Provider<?> configFile)

      Sets the AccessTransformer configuration to use.

      If the given provider does not provide a file or regular file, the result will be resolved using Project.file(Object), similarly to setAccessTransformer(Object).

      Parameters:
      configFile - The configuration file to use
    • accessTransformer

      default void accessTransformer(org.gradle.api.Action<? super net.minecraftforge.accesstransformers.gradle.AccessTransformersContainer.Options> options)
      Configures the AccessTransformer options for this project.
      Parameters:
      options - The options to apply
    • accessTransformer

      void accessTransformer(@DelegatesTo(value=net.minecraftforge.accesstransformers.gradle.AccessTransformersContainer.Options.class,strategy=1) Closure options)
      Configures the AccessTransformer options for this project.
      Parameters:
      options - The options to apply
    • getRuns

      org.gradle.api.NamedDomainObjectContainer<SlimeLauncherOptions> getRuns()
      The collection of Slime Launcher options with which to create the launcher tasks.
      Returns:
      The collection of run task options
    • runs

      void runs(@DelegatesTo(org.gradle.api.NamedDomainObjectContainer.class) Closure<Void> closure)
      Configures the Slime Launcher options for this project, which will be used to create the launcher tasks.
      Parameters:
      closure - The configuring closure
    • runs

      default void runs(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<SlimeLauncherOptions>> action)
      Configures the Slime Launcher options for this project, which will be used to create the launcher tasks.
      Parameters:
      action - The configuring action
    • dep

      org.gradle.api.artifacts.ExternalModuleDependency dep(Object value, @DelegatesTo(value=org.gradle.api.artifacts.ExternalModuleDependency.class,strategy=1) Closure closure)
      Creates (or marks if existing) the given dependency as a Minecraft dependency and configures it with the given closure.
      Parameters:
      value - The dependency
      closure - The closure to configure the dependency with
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(Object value, org.gradle.api.Action<? super org.gradle.api.artifacts.ExternalModuleDependency> action)
      Creates (or marks if existing) the given dependency as a Minecraft dependency and applies the given action to it.
      Parameters:
      value - The dependency
      action - The action to apply to the dependency attributes
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(Object value)
      Creates (or marks if existing) the given dependency as a Minecraft dependency.
      Parameters:
      value - The dependency
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(org.gradle.api.provider.Provider<?> value, @DelegatesTo(value=org.gradle.api.artifacts.ExternalModuleDependency.class,strategy=1) Closure closure)
      Creates (or marks if existing) the given dependency as a Minecraft dependency and configures it with the given closure.
      Parameters:
      value - The dependency
      closure - The closure to configure the dependency with
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(org.gradle.api.provider.Provider<?> value, org.gradle.api.Action<? super org.gradle.api.artifacts.ExternalModuleDependency> action)
      Creates (or marks if existing) the given dependency as a Minecraft dependency and applies the given action to it.
      Parameters:
      value - The dependency
      action - The action to apply to the dependency attributes
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(org.gradle.api.provider.Provider<?> value)
      Creates (or marks if existing) the given dependency as a Minecraft dependency.
      Parameters:
      value - The dependency
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(org.gradle.api.provider.ProviderConvertible<?> value, @DelegatesTo(value=org.gradle.api.artifacts.ExternalModuleDependency.class,strategy=1) Closure closure)
      Creates (or marks if existing) the given dependency as a Minecraft dependency and configures it with the given closure.
      Parameters:
      value - The dependency
      closure - The closure to configure the dependency with
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(org.gradle.api.provider.ProviderConvertible<?> value, org.gradle.api.Action<? super org.gradle.api.artifacts.ExternalModuleDependency> action)
      Creates (or marks if existing) the given dependency as a Minecraft dependency and applies the given action to it.
      Parameters:
      value - The dependency
      action - The action to apply to the dependency attributes
      Returns:
      The dependency
      See Also:
    • dep

      default org.gradle.api.artifacts.ExternalModuleDependency dep(org.gradle.api.provider.ProviderConvertible<?> value)
      Creates (or marks if existing) the given dependency as a Minecraft dependency.
      Parameters:
      value - The dependency
      Returns:
      The dependency
      See Also: