also upload bungee/spigot/velocity

This commit is contained in:
onebeastchris 2024-06-17 17:22:06 +02:00
parent 7f10774c5f
commit 2a27d25d9b
9 changed files with 32 additions and 9 deletions

View file

@ -34,3 +34,8 @@ tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
exclude(dependency("io.netty:netty-resolver-dns:.*")) exclude(dependency("io.netty:netty-resolver-dns:.*"))
} }
} }
modrinth {
uploadFile.set(tasks.getByPath("shadowJar"))
loaders.add("bungeecord")
}

View file

@ -11,9 +11,6 @@ afterEvaluate {
tasks.named("remapModrinthJar").configure { tasks.named("remapModrinthJar").configure {
enabled = false enabled = false
} }
tasks.named("modrinth").configure {
enabled = false
}
} }
dependencies { dependencies {

View file

@ -63,6 +63,7 @@ tasks {
modrinth { modrinth {
loaders.add("fabric") loaders.add("fabric")
uploadFile.set(tasks.getByPath("remapModrinthJar"))
dependencies { dependencies {
required.project("fabric-api") required.project("fabric-api")
} }

View file

@ -55,4 +55,5 @@ tasks {
modrinth { modrinth {
loaders.add("neoforge") loaders.add("neoforge")
uploadFile.set(tasks.getByPath("remapModrinthJar"))
} }

View file

@ -76,3 +76,8 @@ tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
exclude(dependency("com.mojang:.*")) exclude(dependency("com.mojang:.*"))
} }
} }
modrinth {
uploadFile.set(tasks.getByPath("shadowJar"))
loaders.addAll("spigot", "paper")
}

View file

@ -69,4 +69,9 @@ tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
exclude(dependency("net.kyori:adventure-text-serializer-legacy:.*")) exclude(dependency("net.kyori:adventure-text-serializer-legacy:.*"))
exclude(dependency("net.kyori:adventure-nbt:.*")) exclude(dependency("net.kyori:adventure-nbt:.*"))
} }
}
modrinth {
uploadFile.set(tasks.getByPath("shadowJar"))
loaders.addAll("velocity")
} }

View file

@ -6,7 +6,6 @@ import org.gradle.kotlin.dsl.maven
plugins { plugins {
id("geyser.publish-conventions") id("geyser.publish-conventions")
id("geyser.modrinth-uploading")
id("architectury-plugin") id("architectury-plugin")
id("dev.architectury.loom") id("dev.architectury.loom")
} }
@ -109,10 +108,6 @@ afterEvaluate {
} }
} }
modrinth {
uploadFile.set(tasks.getByPath("remapModrinthJar"))
}
dependencies { dependencies {
minecraft(libs.minecraft) minecraft(libs.minecraft)
mappings(loom.officialMojangMappings()) mappings(loom.officialMojangMappings())

View file

@ -6,7 +6,7 @@ plugins {
tasks.modrinth.get().dependsOn(tasks.modrinthSyncBody) tasks.modrinth.get().dependsOn(tasks.modrinthSyncBody)
modrinth { modrinth {
token.set(System.getenv("MODRINTH_TOKEN")) // Even though this is the default value, apparently this prevents GitHub Actions caching the token? token.set(System.getenv("MODRINTH_TOKEN") ?: "") // Even though this is the default value, apparently this prevents GitHub Actions caching the token?
projectId.set("geyser") projectId.set("geyser")
versionNumber.set(project.version as String + "-" + System.getenv("BUILD_NUMBER")) versionNumber.set(project.version as String + "-" + System.getenv("BUILD_NUMBER"))
versionType.set("beta") versionType.set("beta")

View file

@ -26,6 +26,14 @@ val moddedPlatforms = setOf(
projects.mod projects.mod
).map { it.dependencyProject } ).map { it.dependencyProject }
val modrinthPlatforms = setOf(
projects.bungeecord,
projects.fabric,
projects.neoforge,
projects.spigot,
projects.velocity
).map { it.dependencyProject }
subprojects { subprojects {
apply { apply {
plugin("java-library") plugin("java-library")
@ -38,4 +46,10 @@ subprojects {
in moddedPlatforms -> plugins.apply("geyser.modded-conventions") in moddedPlatforms -> plugins.apply("geyser.modded-conventions")
else -> plugins.apply("geyser.base-conventions") else -> plugins.apply("geyser.base-conventions")
} }
// Not combined with platform-conventions as that
// also contains viaproxy and standalone; both of which we cant publish to modrinth
if (modrinthPlatforms.contains(this)) {
plugins.apply("geyser.modrinth-uploading")
}
} }