Plugin to automatically publish artifacts (mods) on the CurseForge portal directly from Gradle build lifecycle.
Kotlin buildscript
plugins {
id("rocks.aur.cursedpublish") version "<version>"
}
Groovy buildscript
plugins {
id 'rocks.aur.cursedpublish' version '<version>'
}
cursedPublish {
projectId("<curseforge-project-id>") // numeric project id from mod page
apiToken("<curseforge-token>") // curseforge token from settings page
// You can use AbstractArchiveTask here to set file name and file source at the same type
file(tasks.jar) {
// Display name for mod file
displayName("MyCoolMod (Fabric)")
// Changelog
changelogMarkdown("# Some changelog for my CoolMod")
// Minecraft version
minecraft("1.20.4")
// ModLoader, usually only one
forge()
neoForge()
fabric()
quilt()
// Java version
java(17)
// Environment
client()
server()
// Release type
alpha()
beta()
release()
relations {
// Define dependencies to other curseforge projects
// You cannot declare one slug more than once
requiredDependency("<project-slug>")
optionalDependency("<project-slug>")
embeddedLibrary("<project-slug>")
incompatible("<project-slug>")
tool("<project-slug>")
}
additionalFile(tasks.sourcesJar) {
// the same as file, but you cannot define game versions
// (minecraft, modloader, java, environment) and nested files here
}
}
}
Plugin will create task for each top-level file (for example, when you register file with name jar
, plugin will create task curseforgeUploadJarFile
to upload file itself and all of its additional files).
All such tasks aggregated into curseforgeUploadAllFiles
meta task to publish all declared files.