Interface PomUtils


public sealed interface PomUtils
Contains utilities to make working with POMs more ergonomic.

This can be accessed by projects using the gradleutils extension.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Contains several licenses used by MinecraftForge to reduce needing to manually write them out in each project that uses one.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<String, org.gradle.api.Action<? super org.gradle.api.publish.maven.MavenPomDeveloper>>
    Contains several developers within the MinecraftForge organization to reduce needing to manually write them out in each project they contribute to.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addForgeDetails(org.gradle.api.publish.maven.MavenPom pom)
    Adds MinecraftForge-specific details to the given POM.
    void
    addRemoteDetails(org.gradle.api.publish.maven.MavenPom pom)
    Adds details from the project's remote URL to the given POM.
    void
    addRemoteDetails(org.gradle.api.publish.maven.MavenPom pom, String url)
    Adds details from the given remote URL to the given POM.
    Allows accessing licenses from buildscripts using gradleutils.pom.licenses.
  • Field Details

    • developers

      static final Map<String, org.gradle.api.Action<? super org.gradle.api.publish.maven.MavenPomDeveloper>> developers

      Contains several developers within the MinecraftForge organization to reduce needing to manually write them out in each project they contribute to.

      If a queried developer does not exist, it is automatically created with the input which is set to the ID and name.

  • Method Details

    • getLicenses

      PomUtils.Licenses getLicenses()
      Allows accessing licenses from buildscripts using gradleutils.pom.licenses.
      Returns:
      A reference to the licenses
      See Also:
    • addForgeDetails

      @Internal static void addForgeDetails(org.gradle.api.publish.maven.MavenPom pom)
      Adds MinecraftForge-specific details to the given POM.
      Parameters:
      pom - The POM to add details to
    • addRemoteDetails

      void addRemoteDetails(org.gradle.api.publish.maven.MavenPom pom)
      Adds details from the project's remote URL to the given POM.
      Parameters:
      pom - The POM to add details to
      API Note:
      If the project does not have the net.minecraftforge.gitversion plugin applied, this method will fail. If you are not using Git Version, manually specify your project's URL using addRemoteDetails(MavenPom,String).
    • addRemoteDetails

      void addRemoteDetails(org.gradle.api.publish.maven.MavenPom pom, String url)
      Adds details from the given remote URL to the given POM.
      Parameters:
      pom - The pom to add details to
      url - The URL of the repository
      API Note:
      If you are using the net.minecraftforge.gitversion plugin, you can use addRemoteDetails(MavenPom) to use the URL discovered by Git Version instead of specifying it manually.