automate publishing w/ cursegradle and minotaur

This commit is contained in:
Jill 2022-11-08 18:44:17 +03:00
parent 9c8e0df4ff
commit b043f18088
4 changed files with 61 additions and 0 deletions

1
CHANGELOG.md Normal file
View File

@ -0,0 +1 @@
Initial release

View File

@ -2,6 +2,8 @@ plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.7.+'
id 'me.hypherionmc.cursegradle' version '2.+'
id "com.modrinth.minotaur" version "2.+"
}
version = project.mod_version
@ -92,3 +94,59 @@ publishing {
// retrieving dependencies.
}
}
import com.modrinth.minotaur.dependencies.ModDependency
curseforge {
if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") }
apiKey = project.hasProperty("CURSEFORGE_TOKEN") ? project.CURSEFORGE_TOKEN : ""
project {
id = '699839'
changelog = file('./CHANGELOG.md')
changelogType = 'markdown'
releaseType = 'release'
accepted_minecraft_version.split(",").each {
addGameVersion it.trim()
}
mainArtifact(remapJar) {
displayName = "${mod_version_friendly}"
relations {
requiredDependency 'fabric-api'
requiredDependency 'cloth-config'
optionalDependency 'modmenu'
}
}
}
options {
//debug = true
javaVersionAutoDetect = false
forgeGradleIntegration = false
}
}
modrinth {
if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") }
token = project.hasProperty("MODRINTH_TOKEN") ? project.MODRINTH_TOKEN : ""
projectId = '3Ug95SjF'
versionNumber = "${mod_version}"
versionName = "${mod_version_friendly}"
changelog = file('./CHANGELOG.md').text
uploadFile = remapJar
accepted_minecraft_version.split(",").each {
gameVersions.add it.trim()
}
loaders = ['fabric', 'quilt']
dependencies = [
// https://modrinth.com/mod/fabric-api
new ModDependency('P7dR8mSH', 'required'),
// https://modrinth.com/mod/cloth-config
new ModDependency('9s6osm5g', 'required'),
]
//debugMode = true
}
task publishToModSites {
publishToModSites.dependsOn modrinth
publishToModSites.dependsOn curseforge
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -4,11 +4,13 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.18.2
accepted_minecraft_version=1.18,1.18.1,1.18.2
yarn_mappings=1.18.2+build.4
loader_version=0.14.10
# Mod Properties
mod_version = 1.0+1.18
mod_version_friendly = 1.0 for 1.18.2
maven_group = zone.oat
archives_base_name = gmod-title-screen