mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2025-01-18 20:41:24 +01:00
update curseforge metadata
This commit is contained in:
parent
2b843d24b9
commit
031ae68a7f
@ -75,34 +75,51 @@ if (!System.getenv()["curse_api_key"].isNullOrBlank() && branch.startsWith("mc-"
|
||||
defaultTasks("clean", "build")
|
||||
}
|
||||
|
||||
fun cfJavaVersions() : List<String> {
|
||||
val ver = mutableListOf("Java 8")
|
||||
if (branch != "mc-1.8") {
|
||||
ver.add("Java 9")
|
||||
ver.add("Java 10")
|
||||
}
|
||||
return ver
|
||||
}
|
||||
|
||||
fun cfMcVersions() : List<String> {
|
||||
return when (branch) {
|
||||
"mc-1.8" -> listOf("1.8.9")
|
||||
"mc-1.14" -> listOf("1.14.4")
|
||||
"mc-1.15" -> listOf("1.15.2")
|
||||
"mc-1.16" -> listOf("1.16.4", "1.16.5")
|
||||
"mc-1.17" -> listOf("1.17")
|
||||
else -> emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
fun fabricApiId() : String {
|
||||
return if (branch == "mc-1.8") {
|
||||
"legacy-fabric-api"
|
||||
} else {
|
||||
"fabric-api"
|
||||
}
|
||||
}
|
||||
|
||||
curseforge {
|
||||
apiKey = System.getenv()["curse_api_key"] ?: "undefined"
|
||||
project(closureOf<com.matthewprenger.cursegradle.CurseProject> {
|
||||
id = "391298"
|
||||
changelog = "A changelog can be found at https://github.com/ViaVersion/ViaFabric/commits"
|
||||
releaseType = "alpha"
|
||||
addGameVersion("Java 8")
|
||||
if (branch != "mc-1.8") {
|
||||
addGameVersion("Java 9")
|
||||
addGameVersion("Java 10")
|
||||
}
|
||||
when (branch) {
|
||||
"mc-1.8" -> listOf("1.8.9")
|
||||
"mc-1.14" -> listOf("1.14", "1.14.1", "1.14.2", "1.14.3", "1.14.4")
|
||||
"mc-1.15" -> listOf("1.15", "1.15.1", "1.15.2")
|
||||
"mc-1.16" -> listOf("1.16", "1.16.1", "1.16.2", "1.16.3", "1.16.4", "1.16.5")
|
||||
"mc-1.17" -> listOf("1.17")
|
||||
else -> emptyList()
|
||||
}.forEach {
|
||||
|
||||
addGameVersion("Fabric")
|
||||
|
||||
(cfMcVersions() + cfJavaVersions()).forEach {
|
||||
addGameVersion(it)
|
||||
}
|
||||
addGameVersion("Fabric")
|
||||
mainArtifact(file("${project.buildDir}/libs/${project.base.archivesBaseName}-${project.version}.jar"), closureOf<com.matthewprenger.cursegradle.CurseArtifact> {
|
||||
mainArtifact(file("${project.buildDir}/libs/${project.base.archivesBaseName}-${project.version}.jar"),
|
||||
closureOf<com.matthewprenger.cursegradle.CurseArtifact> {
|
||||
relations(closureOf<com.matthewprenger.cursegradle.CurseRelation> {
|
||||
if (branch == "mc-1.8") {
|
||||
requiredDependency("legacy-fabric-api")
|
||||
} else {
|
||||
requiredDependency("fabric-api")
|
||||
requiredDependency(fabricApiId())
|
||||
if (branch == "mc-1.14" || branch == "mc-1.15") {
|
||||
embeddedLibrary("cotton-client-commands")
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user