diff --git a/.github/workflows/1.18_push.yml b/.github/workflows/1.18_push.yml
index 88c3f43f..63d371f4 100644
--- a/.github/workflows/1.18_push.yml
+++ b/.github/workflows/1.18_push.yml
@@ -73,4 +73,4 @@ jobs:
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
with:
- arguments: publish curseforge modrinth --stacktrace --no-daemon
+ arguments: publish publishUnified --stacktrace --no-daemon
diff --git a/build.gradle b/build.gradle
index 048083d4..110affba 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,8 +10,7 @@ plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "org.cadixdev.licenser" version "0.6.1"
- id "com.matthewprenger.cursegradle" version "1.4.0" apply false
- id "com.modrinth.minotaur" version "2.2.0" apply false
+ id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id "maven-publish"
}
@@ -98,12 +97,12 @@ allprojects {
}
def time = dateFormat.format(new Date())
def changes = new StringBuilder()
- changes << "
Architectury v$project.version for $project.supported_version
Updated at $time.
Click here for changelog"
+ changes << "## Architectury v$project.version for $project.supported_version\nUpdated at **$time**.\n[Click here for changelog](https://www.github.com/architectury/architectury/commits/$branch)"
def proc = "git log --max-count=200 --pretty=format:%s".execute()
proc.in.eachLine { line ->
def processedLine = line.toString()
if (!processedLine.contains("New translations") && !processedLine.contains("Merge") && !processedLine.contains("branch")) {
- changes << "
- ${processedLine.capitalize()}"
+ changes << "\n- ${processedLine.capitalize()}"
}
}
proc.waitFor()
diff --git a/fabric/build.gradle b/fabric/build.gradle
index 9c67c1dd..966ae070 100644
--- a/fabric/build.gradle
+++ b/fabric/build.gradle
@@ -1,7 +1,6 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
- id "com.matthewprenger.cursegradle"
- id "com.modrinth.minotaur"
+ id "me.shedaniel.unified-publishing"
}
loom {
@@ -99,51 +98,37 @@ publishing {
}
}
-curseforge {
- var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
- if (CURSE_API_KEY != null) {
- apiKey = CURSE_API_KEY
- project {
- id = rootProject.curseforge_id
- releaseType = "$rootProject.artifact_type"
- changelogType = "html"
- changelog = releaseChangelog()
- addGameVersion "1.18.2"
- addGameVersion "1.18-Snapshot"
- addGameVersion "Java 17"
- addGameVersion "Fabric"
- relations {
- requiredDependency "fabric-api"
- }
- mainArtifact(remapJar.archivePath) {
- displayName = "[Fabric $rootProject.supported_version] v$project.version"
- }
- afterEvaluate {
- uploadTask.dependsOn("build")
- }
- }
- }
- options {
- forgeGradleIntegration = false
- javaVersionAutoDetect = false
- }
-}
-
-modrinth {
- var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
- if (MODRINTH_TOKEN != null) {
- token = MODRINTH_TOKEN
- projectId = rootProject.modrinth_id
- versionType = "$rootProject.artifact_type"
- versionNumber = "$project.version+$project.name"
- versionName = "[Fabric $rootProject.supported_version] v$project.version"
+unifiedPublishing {
+ project {
+ displayName = "[Fabric $rootProject.supported_version] v$project.version"
+ releaseType = "$rootProject.artifact_type"
changelog = releaseChangelog()
- uploadFile = remapJar
gameVersions = ["1.18.2"]
- loaders = ["fabric", "quilt"]
- dependencies {
- // TODO: move to slugs if that functionality becomes available in minotaur
- required.project("P7dR8mSH") // Fabric API
+ gameLoaders = ["fabric", "quilt"]
+ mainPublication remapJar
+ relations {
+ depends {
+ curseforge = "fabric-api"
+ modrinth = "fabric-api"
+ }
+ }
+
+ var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
+ if (CURSE_API_KEY != null) {
+ curseforge {
+ token = CURSE_API_KEY
+ id = rootProject.curseforge_id
+ gameVersions.addAll "Java 17", "1.18-Snapshot"
+ }
+ }
+
+ var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
+ if (MODRINTH_TOKEN != null) {
+ modrinth {
+ token = MODRINTH_TOKEN
+ id = rootProject.modrinth_id
+ version = "$project.version+$project.name"
+ }
}
}
}
diff --git a/forge/build.gradle b/forge/build.gradle
index d2858bec..b5a8dff0 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle
@@ -1,7 +1,6 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
- id "com.matthewprenger.cursegradle"
- id "com.modrinth.minotaur"
+ id "me.shedaniel.unified-publishing"
}
loom {
@@ -112,45 +111,31 @@ publishing {
}
}
-curseforge {
- var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
- if (CURSE_API_KEY != null) {
- apiKey = CURSE_API_KEY
- project {
- id = rootProject.curseforge_id
- releaseType = "$rootProject.artifact_type"
- changelogType = "html"
- changelog = releaseChangelog()
- addGameVersion "1.18.2"
- addGameVersion "Java 17"
- addGameVersion "Forge"
- mainArtifact(remapJar.archivePath) {
- displayName = "[Forge $rootProject.supported_version] v$project.version"
- }
- afterEvaluate {
- uploadTask.dependsOn("build")
- }
- }
- }
- options {
- forgeGradleIntegration = false
- javaVersionAutoDetect = false
- }
-}
-
-modrinth {
- var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
- if (MODRINTH_TOKEN != null) {
- token = MODRINTH_TOKEN
- projectId = rootProject.modrinth_id
- versionType = "$rootProject.artifact_type"
- versionNumber = "$project.version+$project.name"
- versionName = "[Forge $rootProject.supported_version] v$project.version"
+unifiedPublishing {
+ project {
+ displayName = "[Forge $rootProject.supported_version] v$project.version"
+ releaseType = "$rootProject.artifact_type"
changelog = releaseChangelog()
- uploadFile = remapJar
gameVersions = ["1.18.2"]
- loaders = ["forge"]
- dependencies {
+ gameLoaders = ["forge"]
+ mainPublication remapJar
+
+ var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
+ if (CURSE_API_KEY != null) {
+ curseforge {
+ token = CURSE_API_KEY
+ id = rootProject.curseforge_id
+ gameVersions.addAll "Java 17"
+ }
+ }
+
+ var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
+ if (MODRINTH_TOKEN != null) {
+ modrinth {
+ token = MODRINTH_TOKEN
+ id = rootProject.modrinth_id
+ version = "$project.version+$project.name"
+ }
}
}
}