Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shedaniel/unified-publishing
Publish to both CurseForge and Modrinth at once!
https://github.com/shedaniel/unified-publishing
Last synced: 3 months ago
JSON representation
Publish to both CurseForge and Modrinth at once!
- Host: GitHub
- URL: https://github.com/shedaniel/unified-publishing
- Owner: shedaniel
- License: lgpl-2.1
- Created: 2022-06-11T06:59:12.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T15:04:57.000Z (about 1 year ago)
- Last Synced: 2023-11-18T16:37:20.653Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 104 KB
- Stars: 13
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Unified Publishing
### Usage
settings.gradle:
```groovy
pluginManagement {
repositories {
maven { url "https://maven.architectury.dev/" }
gradlePluginPortal()
}
}
```build.gradle:
```groovy
plugins {
id "me.shedaniel.unified-publishing" version "0.1.+"
}
```Most Simple Usage:
```groovy
unifiedPublishing {
project {
gameVersions = ["1.18.2"]
gameLoaders = ["fabric"]mainPublication tasks.remapJar // Declares the publicated jar
var cfToken = System.getenv("CF_TOKEN")
if (cfToken != null) {
curseforge {
token = cfToken
id = "000000" // Required, must be a string, ID of CurseForge project
}
}var mrToken = System.getenv("MODRINTH_TOKEN")
if (mrToken != null) {
modrinth {
token = mrToken
id = "P7dR8mSH" // Required, must be a string, ID of Modrinth project
}
}
}
}
```Full Usage:
```groovy
unifiedPublishing {
project {
displayName = "v1.0.0" // Optional, name of the file
version = "1.0.0" // Optional, Inferred from project by default
changelog = "I am the changelog" // Optional, in markdown format
releaseType = "release" // Optional, use "release", "beta" or "alpha"
gameVersions = ["1.18.2"]
gameLoaders = ["fabric"]mainPublication tasks.remapJar // Declares the publicated jar
relations {
depends { // Mark as a required dependency
curseforge = "fabric-api" // Optional, project slug
modrinth = "fabric-api" // Optional, project slug or id
}
includes {} // Mark as an included dependency
optional {} // Mark as an optional dependency
conflicts {} // Mark as a conflicted dependency
}curseforge {
token = System.getenv("CF_TOKEN")
id = "000000" // Required, must be a string, ID of CurseForge projectdisplayName = "v1.0.0" // Optional, Inferred from the property above by default
version = "1.0.0" // Optional, Inferred from the property above by default
changelog = "I am the changelog" // Optional, Inferred from the property above by default
releaseType = "release" // Optional, Inferred from the property above by default
gameVersions = ["1.18.2"] // Optional, Inferred from the property above by default
gameLoaders = ["fabric"] // Optional, Inferred from the property above by defaultmainPublication tasks.remapJar // Optional, Inferred from the property above by default
relations { // Optional, Inferred from the relations above by default
depends "fabric-api" // Mark as a required dependency
includes "fabric-api" // Mark as an included dependency
optional "fabric-api" // Mark as an optional dependency
conflicts "fabric-api" // Mark as a conflicted dependency
}
}modrinth {
token = System.getenv("MODRINTH_TOKEN")
id = "P7dR8mSH" // Required, must be a string, ID of Modrinth projectdisplayName = "v1.0.0" // Optional, Inferred from the property above by default
version = "1.0.0" // Optional, Inferred from the property above by default
changelog = "I am the changelog" // Optional, Inferred from the property above by default
releaseType = "release" // Optional, Inferred from the property above by default
gameVersions = ["1.18.2"] // Optional, Inferred from the property above by default
gameLoaders = ["fabric"] // Optional, Inferred from the property above by defaultmainPublication tasks.remapJar // Optional, Inferred from the property above by default
relations { // Optional, Inferred from the relations above by default
depends "fabric-api" // Mark as a required dependency
includes "fabric-api" // Mark as an included dependency
optional "fabric-api" // Mark as an optional dependency
conflicts "fabric-api" // Mark as a conflicted dependency
}
}
}
}
```