Add mod publish plugin

This commit is contained in:
FlorianMichael 2024-04-28 21:30:43 +02:00
parent 08cf5e9929
commit 2721955931
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
2 changed files with 25 additions and 0 deletions

2
CHANGELOG.md Normal file
View File

@ -0,0 +1,2 @@
- Updated Via* projects to support 1.20.5
- Fixed version in 1.12 mcmod.info file

View File

@ -11,12 +11,14 @@ buildscript {
classpath "com.github.johnrengelman:shadow:7.1.2"
classpath "net.minecraftforge.gradle:ForgeGradle:6.+"
classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT"
classpath "me.modmuss50:mod-publish-plugin:0.5.1"
}
}
allprojects {
apply plugin: "java-library"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "me.modmuss50.mod-publish-plugin"
// We define the configuration here so we can use it across all conventions and platforms
// To define which projects/source files should be included in the jar
@ -173,6 +175,27 @@ subprojects {
}
}
publishMods {
file = shadowJar.archiveFile
type = STABLE
displayName = rootProject.name + ' ' + project.version
version = project.version + "+" + project.mc_version
modLoaders.add("forge")
changelog = file("../CHANGELOG.md").text
dryRun = rootProject.maven_version.contains("SNAPSHOT")
curseforge {
accessToken = providers.gradleProperty("curseforge.publishing_token")
projectId = "418933"
minecraftVersions.addAll(project.mc_version.split(','))
}
modrinth {
accessToken = providers.gradleProperty("modrinth.publishing_token")
projectId = "Z6se2s8f"
minecraftVersions.addAll(project.mc_version.split(','))
}
}
reobf {
shadowJar {}
}