Package io.github.smootheez
Class McModPublisherExtension
java.lang.Object
io.github.smootheez.McModPublisherExtension
Gradle extension that configures publishing options for Minecraft mods
to platforms such as CurseForge and Modrinth.
This extension exposes user-defined metadata (version, changelog, loaders, etc.), file selection, and platform-specific configuration blocks. It is registered in the Gradle build script, allowing developers to declare publishing settings directly in their project configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionMcModPublisherExtension(org.gradle.api.Project project, org.gradle.api.model.ObjectFactory objects) Creates the extension and initializes file collection and platform configurations. -
Method Summary
Modifier and TypeMethodDescriptionvoidcurseforge(org.gradle.api.Action<CurseforgeConfig> action) Applies user configuration to the CurseForge publishing settings.voidmodrinth(org.gradle.api.Action<ModrinthConfig> action) Applies user configuration to the Modrinth publishing settings.
-
Constructor Details
-
McModPublisherExtension
@Inject public McModPublisherExtension(org.gradle.api.Project project, org.gradle.api.model.ObjectFactory objects) Creates the extension and initializes file collection and platform configurations.- Parameters:
project- the Gradle project to attach file collections toobjects- Gradle object factory for constructing nested configuration objects
-
-
Method Details
-
modrinth
Applies user configuration to the Modrinth publishing settings.- Parameters:
action- a configuration action providing access toModrinthConfig
-
curseforge
Applies user configuration to the CurseForge publishing settings.- Parameters:
action- a configuration action providing access toCurseforgeConfig
-