Class NamedDependency
java.lang.Object
com.modrinth.minotaur.dependencies.container.NamedDependency
- All Implemented Interfaces:
org.gradle.api.Named
Defines a Named Dependency for our NamedDependencyContainer.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNamedDependency(@Nullable String projectId, @Nullable String versionId, DependencyType dependencyType) Instantiates a new NamedDependency. -
Method Summary
Modifier and TypeMethodDescription@NotNull DependencyReturn this as a never nullVersionDependencyorModDependencydepending on which id is set.Gets the DependencyType as String.@NotNull StringgetName()
-
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-nullversionId- the versionId if not-nulldependencyType- the DependencyType
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.gradle.api.Named- Returns:
- the container id, is only of either projectId or versionId
-
getDependencyType
Gets the DependencyType as String.- Returns:
- the type
-
getDependency
Return this as a never nullVersionDependencyorModDependencydepending on which id is set.- Returns:
Dependencydynamically created Dependency
-