Class ModMetadataFiles

java.lang.Object
dev.architectury.loom.metadata.ModMetadataFiles

public final class ModMetadataFiles extends Object
Utilities for reading mod metadata files.
  • Constructor Details

    • ModMetadataFiles

      public ModMetadataFiles()
  • Method Details

    • fromJar

      public static @Nullable ModMetadataFile fromJar(Path jar) throws IOException
      Reads the mod metadata file from a jar.
      Parameters:
      jar - the path to the jar file
      Returns:
      the mod metadata file, or null if not found
      Throws:
      IOException
    • fromDirectory

      public static @Nullable ModMetadataFile fromDirectory(Path directory) throws IOException
      Reads the mod metadata file from a directory.
      Parameters:
      directory - the path to the directory
      Returns:
      the mod metadata file, or null if 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 sets
      sourceSets - the source sets to read from
      Returns:
      the mod metadata file, or null if not found
      Throws:
      IOException