Package dev.architectury.loom.metadata
Class ModMetadataFiles
java.lang.Object
dev.architectury.loom.metadata.ModMetadataFiles
Utilities for reading mod metadata files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ModMetadataFilefromDirectory(Path directory) Reads the mod metadata file from a directory.static @Nullable ModMetadataFileReads the mod metadata file from a jar.static @Nullable ModMetadataFilefromSourceSets(org.gradle.api.Project project, org.gradle.api.tasks.SourceSet... sourceSets) Reads the first mod metadata file from source sets.
-
Constructor Details
-
ModMetadataFiles
public ModMetadataFiles()
-
-
Method Details
-
fromJar
Reads the mod metadata file from a jar.- Parameters:
jar- the path to the jar file- Returns:
- the mod metadata file, or
nullif not found - Throws:
IOException
-
fromDirectory
Reads the mod metadata file from a directory.- Parameters:
directory- the path to the directory- Returns:
- the mod metadata file, or
nullif not found - Throws:
IOException
-
fromSourceSets
public static @Nullable ModMetadataFile fromSourceSets(org.gradle.api.Project project, org.gradle.api.tasks.SourceSet... sourceSets) throws IOException Reads the first mod metadata file from source sets.- Parameters:
project- the project owning the source setssourceSets- the source sets to read from- Returns:
- the mod metadata file, or
nullif not found - Throws:
IOException
-