Class NamedDependency

java.lang.Object
com.modrinth.minotaur.dependencies.container.NamedDependency
All Implemented Interfaces:
org.gradle.api.Named

public class NamedDependency extends Object implements org.gradle.api.Named
Defines a Named Dependency for our NamedDependencyContainer.
  • Constructor Details

    • NamedDependency

      protected NamedDependency(@Nullable @Nullable String projectId, @Nullable @Nullable String versionId, DependencyType dependencyType)
      Instantiates a new NamedDependency.
      Parameters:
      projectId - the projectId if not-null
      versionId - the versionId if not-null
      dependencyType - the DependencyType
  • Method Details

    • getName

      @NotNull public @NotNull String getName()
      Specified by:
      getName in interface org.gradle.api.Named
      Returns:
      the container id, is only of either projectId or versionId
    • getDependencyType

      public DependencyType getDependencyType()
      Gets the DependencyType as String.
      Returns:
      the type
    • getDependency

      @NotNull public @NotNull Dependency getDependency()
      Return this as a never null VersionDependency or ModDependency depending on which id is set.
      Returns:
      Dependency dynamically created Dependency