Closed FaeWulf closed 1 month ago
I tried to replicate the issue, with one of the test projects in the plugin, but couldn't.
publisher {
apiKeys {
modrinth System.getenv("MODRINTH_TOKEN")
curseforge System.getenv("CURSE_TOKEN")
nightbloom("1253")
}
setDebug(true)
setCurseID("1234")
setModrinthID("dsgfhs79789")
setVersionType(version_type as String)
setNightbloomID("craterlib")
setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/sdlink/combo.md")
setProjectVersion("1.20.2-${project.version}")
setDisplayName("[1.20.x] Simple Discord Link - ${project.version}")
setGameVersions("1.20", "1.20.1", "1.20.2")
setLoaders(ModLoader.FABRIC, ModLoader.FORGE)
setCurseEnvironment(CurseEnvironment.BOTH)
setArtifact(jar)
setPlatformArtifact(com.hypherionmc.modpublisher.properties.Platform.MODRINTH, createDummyJar)
setDisableEmptyJarCheck(true)
addAdditionalFile(jar)
setJavaVersions(JavaVersion.VERSION_1_8, "Java 11", 17)
setIsManualRelease(true)
addAdditionalFile {
artifact jar
displayName "Some Name"
changelog "Hello Changelog"
}
github {
tag("v${project.version}")
createTag(true)
createRelease(true)
updateRelease(true)
displayName("Hello World")
}
modrinthDepends {
required "fabric-api", "craterlib"
required "fabric-api"
}
curseDepends {
required "fabric-api", "craterlib"
}
}
Is your code maybe available on GitHub so that I can check it out?
Yes, here is my sourcecode: https://github.com/FaeWulf/Diversity The code above is in the root project build.gradle
Was able to reproduce the issue with your repo.
The problem is this:
version_type=beta # release, beta, alpha
.
Changing it to version_type=beta
fixes the issue.
Additionally, your setArtifact
path is incorrect.
Changing it to setArtifact("${subproject.buildDir}/libs/${mod_id}-${subproject.name}-${minecraft_version}-${project.version}.jar")
fixes it
Finally, your changelog. It should be setChangelog(file("${subproject.rootDir}/CHANGELOG.md"))
since you are using a file. As you have it currently set, your changelog will literally be CHANGELOG.md
instead of the contents of it
Thank you very much! Solved the issue.
Additionally, your setArtifact path is incorrect.
Changing it to setArtifact("${subproject.buildDir}/libs/${mod_id}-${subproject.name}-${minecraft_version}-${project.version}.jar") fixes it
There is a task above this I use to move all artifact from subproject to the root/build folder, so no worry! Thank you for the extra infomation.
Got this 2 error when use
publishModrinth
orpublishCurseforge
Build.gradle:
version_type
is a propertie fromgradle.properties
: