Package net.fabricmc.loom.api
Class ModSettings
java.lang.Object
net.fabricmc.loom.api.ModSettings
- All Implemented Interfaces:
org.gradle.api.Named
A
Named object for setting mod-related values. The name should match the mod id.-
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 TypeMethodDescriptionvoidconfiguration(org.gradle.api.artifacts.Configuration configuration) Add aConfigurationto the mod's classpath group.voiddependency(org.gradle.api.artifacts.Dependency... dependencies) Add a number ofDependencyto the mod's classpath group.abstract org.gradle.api.provider.ListProperty<ExternalClasspathGroup> List ofExternalClasspathGroupthat will later be resolved to populate the classpath groups from another Gradle project.abstract org.gradle.api.file.DirectoryPropertyThe main resource directory in the mod.abstract org.gradle.api.file.ConfigurableFileCollectionList of classpath directories, or jar files used to populate the `fabric.classPathGroups` Fabric Loader system property.abstract org.gradle.api.provider.ListProperty<SourceSetReference> Deprecated, for removal: This API element is subject to removal in a future version.abstract org.gradle.api.ProjectvoidAddSourceSet's output directories from the current project to be grouped with the named mod.voidAddSourceSet's output directories from the supplied project to be grouped with the named mod.voidAddSourceSet's output directories from the supplied project to be grouped with the named mod.voidDeprecated.voidsourceSet(org.gradle.api.tasks.SourceSet sourceSet) AddSourceSet's output directories from the current project to be grouped with the named mod.voidsourceSet(org.gradle.api.tasks.SourceSet sourceSet, org.gradle.api.Project project) Deprecated.Replaced withsourceSet(String, String)to avoid passing a project reference.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gradle.api.Named
getName
-
Constructor Details
-
ModSettings
@Inject public ModSettings()
-
-
Method Details
-
getModFiles
public abstract org.gradle.api.file.ConfigurableFileCollection getModFiles()List of classpath directories, or jar files used to populate the `fabric.classPathGroups` Fabric Loader system property. -
getMainResourceDirectory
@Experimental public abstract org.gradle.api.file.DirectoryProperty getMainResourceDirectory()The main resource directory in the mod. On Forge and NeoForge, this is the resource directory that contains mods.toml. -
sourceSet
public void sourceSet(org.gradle.api.tasks.SourceSet sourceSet) AddSourceSet's output directories from the current project to be grouped with the named mod. -
sourceSet
AddSourceSet's output directories from the current project to be grouped with the named mod.- Parameters:
name- the name of the source set
-
sourceSet
@Deprecated public void sourceSet(org.gradle.api.tasks.SourceSet sourceSet, org.gradle.api.Project project) Deprecated.Replaced withsourceSet(String, String)to avoid passing a project reference.AddSourceSet's output directories from the supplied project to be grouped with the named mod. -
sourceSet
Deprecated.Replaced withsourceSet(String, String)to avoid passing a project reference.AddSourceSet's output directories from the supplied project to be grouped with the named mod.- Parameters:
name- the name of the source set
-
sourceSet
AddSourceSet's output directories from the supplied project to be grouped with the named mod.If the other project is not a Loom project you must apply the `net.fabricmc.fabric-loom-companion` plugin.
- Parameters:
sourceSetName- the name of the source setprojectPath- the path of the project the source set belongs to
-
sourceSet
public void sourceSet(String sourceSetName, org.gradle.api.artifacts.ProjectDependency projectDependency) AddSourceSet's output directories from the supplied project to be grouped with the named mod.If the other project is not a Loom project you must apply the `net.fabricmc.fabric-loom-companion` plugin.
- Parameters:
sourceSetName- the name of the source setprojectDependency- theProjectDependencythe source set belongs to
-
dependency
public void dependency(org.gradle.api.artifacts.Dependency... dependencies) Add a number ofDependencyto the mod's classpath group. Should be used to include all dependencies that are shaded into your mod.Uses a detached configuration.
-
configuration
public void configuration(org.gradle.api.artifacts.Configuration configuration) Add aConfigurationto the mod's classpath group. Should be used to include all dependencies that are shaded into your mod. -
getExternalGroups
@Internal public abstract org.gradle.api.provider.ListProperty<ExternalClasspathGroup> getExternalGroups()List ofExternalClasspathGroupthat will later be resolved to populate the classpath groups from another Gradle project. -
getProject
@Inject public abstract org.gradle.api.Project getProject() -
toString
-
getModSourceSets
@Internal @Deprecated(forRemoval=true) public abstract org.gradle.api.provider.ListProperty<SourceSetReference> getModSourceSets()Deprecated, for removal: This API element is subject to removal in a future version.
-
sourceSet(String, String)to avoid passing a project reference.