Package io.github.smootheez.modrinth
Class ModrinthConfig
java.lang.Object
io.github.smootheez.PublisherConfig<ModrinthDependency,String>
io.github.smootheez.modrinth.ModrinthConfig
Configuration block for publishing mods to Modrinth.
This class extends PublisherConfig to provide Modrinth-specific
dependency handling and upload options such as featured status and version
listing state.
-
Field Summary
Fields inherited from class io.github.smootheez.PublisherConfig
dependencies -
Constructor Summary
ConstructorsConstructorDescriptionModrinthConfig(org.gradle.api.model.ObjectFactory objects) Creates a new Modrinth configuration instance and initializes the dependency container. -
Method Summary
Modifier and TypeMethodDescriptionvoiddependencies(org.gradle.api.Action<org.gradle.api.NamedDomainObjectContainer<ModrinthDependency>> action) Applies the provided configuration action to the Modrinth dependency container.Creates an embedded dependency entry for the given Modrinth project ID.incompatible(String id) Creates an incompatible dependency entry for the given Modrinth project ID.Creates an optional dependency entry for the given Modrinth project ID.Creates a required dependency entry for the given Modrinth project ID.
-
Constructor Details
-
ModrinthConfig
@Inject public ModrinthConfig(org.gradle.api.model.ObjectFactory objects) Creates a new Modrinth configuration instance and initializes the dependency container.- Parameters:
objects- Gradle object factory used to construct dependency instances
-
-
Method Details
-
dependencies
public void dependencies(org.gradle.api.Action<org.gradle.api.NamedDomainObjectContainer<ModrinthDependency>> action) Applies the provided configuration action to the Modrinth dependency container.- Specified by:
dependenciesin classPublisherConfig<ModrinthDependency,String> - Parameters:
action- an action that configures the dependency container
-
required
Creates a required dependency entry for the given Modrinth project ID.- Specified by:
requiredin classPublisherConfig<ModrinthDependency,String> - Parameters:
id- project ID on Modrinth- Returns:
- the created dependency
-
optional
Creates an optional dependency entry for the given Modrinth project ID.- Specified by:
optionalin classPublisherConfig<ModrinthDependency,String> - Parameters:
id- project ID on Modrinth- Returns:
- the created dependency
-
incompatible
Creates an incompatible dependency entry for the given Modrinth project ID.- Specified by:
incompatiblein classPublisherConfig<ModrinthDependency,String> - Parameters:
id- project ID on Modrinth- Returns:
- the created dependency
-
embedded
Creates an embedded dependency entry for the given Modrinth project ID.- Specified by:
embeddedin classPublisherConfig<ModrinthDependency,String> - Parameters:
id- project ID on Modrinth- Returns:
- the created dependency
-