Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prototik/cursedpublish

Plugin to automatically publish artifacts (mods) on the CurseForge portal directly from Gradle build lifecycle.
https://github.com/prototik/cursedpublish

Last synced: about 1 month ago
JSON representation

Plugin to automatically publish artifacts (mods) on the CurseForge portal directly from Gradle build lifecycle.

Awesome Lists containing this project

README

        

# Cursed Publish plugin

[![Gradle versions](https://img.shields.io/badge/Gradle-6.8_--_8.5-02303A?logo=gradle&logoColor=02303A&labelColor=white)](https://gradle.org)
![Java versions](https://img.shields.io/badge/Java-8_--_21-f7901e?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDE2IDE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im03LjY2NzMgOC41OTE0cy0wLjg5MTk0LTEuNzE4Ny0wLjg1OS0yLjk3NDZjMC4wMjQwMzMtMC44OTc0NSAyLjA0NzYtMS43ODQ2IDIuODQyLTMuMDcyNyAwLjc5MzA3LTEuMjg4OS0wLjA5ODg3Mi0yLjU0NC0wLjA5ODg3Mi0yLjU0NHMwLjE5ODQ0IDAuOTI1NTktMC4zMzAyOSAxLjg4MjhjLTAuNTI4NyAwLjk1ODU3LTIuNDgwMiAxLjUyMDktMy4yMzg5IDMuMTczLTAuNzU4NzMgMS42NTIxIDEuNjg1IDMuNTM1NiAxLjY4NSAzLjUzNTZ6IiBmaWxsPSIjZjc5MDFlIiBzdHJva2Utd2lkdGg9Ii4wMzE4MzIiLz48cGF0aCBkPSJtMTEuMDA2IDMuMzcwMXMtMy4wMzk4IDEuMTU3LTMuMDM5OCAyLjQ3ODFjMCAxLjMyMjUgMC44MjUzNSAxLjc1MTYgMC45NTg1NyAyLjE4MDggMC4xMzE4NSAwLjQzMDUzLTAuMjMxMzkgMS4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NTE1Ni03LjAyNjUgMC4xMjk3OC03LjAyNjUgMC4xMjk3OHMzLjQzNTMgMC44MTU3NCA3LjM1NjggMC4xMzMyMmMxLjg3NDUtMC4zMjY4NiAxLjk4MzctMS4yMzM5IDEuOTgzNy0xLjIzMzlzLTAuNTczMzMgMC42MTcyOS0yLjMxNCAwLjk3MDkyeiIvPjwvZz48L3N2Zz4K&labelColor=white)

Plugin to automatically publish artifacts (mods) on the CurseForge portal directly from Gradle build lifecycle.

## Setup

[![Latest version](https://img.shields.io/gradle-plugin-portal/v/rocks.aur.cursedpublish?logo=gradle&label=Latest%20version&color=%2302303A)](https://plugins.gradle.org/plugin/rocks.aur.cursedpublish)

Kotlin buildscript

```kotlin
plugins {
id("rocks.aur.cursedpublish") version ""
}
```

Groovy buildscript

```groovy
plugins {
id 'rocks.aur.cursedpublish' version ''
}
```

## Configuration

```kotlin
cursedPublish {
projectId("") // numeric project id from mod page
apiToken("") // 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("")
optionalDependency("")
embeddedLibrary("")
incompatible("")
tool("")
}

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.