2024-09-03 06:54:50 +02:00
|
|
|
plugins {
|
|
|
|
id("geyser.modded-conventions")
|
|
|
|
id("geyser.modrinth-uploading-conventions")
|
|
|
|
}
|
2024-03-19 23:05:30 +01:00
|
|
|
|
2024-02-23 17:58:39 +01:00
|
|
|
architectury {
|
|
|
|
platformSetupLoomIde()
|
|
|
|
neoForge()
|
|
|
|
}
|
|
|
|
|
2024-09-03 06:54:50 +02:00
|
|
|
// This is provided by "org.cloudburstmc.math.mutable" too, so yeet.
|
|
|
|
// NeoForge's class loader is *really* annoying.
|
|
|
|
provided("org.cloudburstmc.math", "api")
|
|
|
|
provided("com.google.errorprone", "error_prone_annotations")
|
|
|
|
|
2024-10-31 11:24:54 +01:00
|
|
|
// Jackson shipped by Minecraft is too old, so we shade & relocate our newer version
|
|
|
|
relocate("com.fasterxml.jackson")
|
|
|
|
|
2024-03-19 23:05:30 +01:00
|
|
|
val includeTransitive: Configuration = configurations.getByName("includeTransitive")
|
|
|
|
|
2024-02-23 17:58:39 +01:00
|
|
|
dependencies {
|
|
|
|
// See https://github.com/google/guava/issues/6618
|
|
|
|
modules {
|
|
|
|
module("com.google.guava:listenablefuture") {
|
|
|
|
replacedBy("com.google.guava:guava", "listenablefuture is part of guava")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
neoForge(libs.neoforge.minecraft)
|
|
|
|
|
|
|
|
api(project(":mod", configuration = "namedElements"))
|
|
|
|
shadow(project(path = ":mod", configuration = "transformProductionNeoForge")) {
|
|
|
|
isTransitive = false
|
|
|
|
}
|
2024-03-24 17:12:40 +01:00
|
|
|
shadow(projects.core) { isTransitive = false }
|
2024-03-19 23:05:30 +01:00
|
|
|
|
2024-10-31 11:24:54 +01:00
|
|
|
// Minecraft (1.21.2+) includes jackson. But an old version!
|
|
|
|
shadow(libs.jackson.core) { isTransitive = false }
|
|
|
|
shadow(libs.jackson.databind) { isTransitive = false }
|
|
|
|
shadow(libs.jackson.dataformat.yaml) { isTransitive = false }
|
|
|
|
shadow(libs.jackson.annotations) { isTransitive = false }
|
|
|
|
|
2024-03-24 17:12:40 +01:00
|
|
|
// Let's shade in our own api
|
|
|
|
shadow(projects.api) { isTransitive = false }
|
2024-05-12 10:49:08 +02:00
|
|
|
|
|
|
|
// cannot be shaded, since neoforge will complain if floodgate-neoforge tries to provide this
|
|
|
|
include(projects.common)
|
2024-03-24 17:12:40 +01:00
|
|
|
|
|
|
|
// Include all transitive deps of core via JiJ
|
2024-03-19 23:05:30 +01:00
|
|
|
includeTransitive(projects.core)
|
2024-07-12 06:56:42 +02:00
|
|
|
|
|
|
|
modImplementation(libs.cloud.neoforge)
|
|
|
|
include(libs.cloud.neoforge)
|
2024-02-23 17:58:39 +01:00
|
|
|
}
|
|
|
|
|
2024-07-12 06:56:42 +02:00
|
|
|
tasks.withType<Jar> {
|
|
|
|
manifest.attributes["Main-Class"] = "org.geysermc.geyser.platform.neoforge.GeyserNeoForgeMain"
|
2024-02-23 17:58:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
remapJar {
|
|
|
|
archiveBaseName.set("Geyser-NeoForge")
|
|
|
|
}
|
|
|
|
|
|
|
|
remapModrinthJar {
|
|
|
|
archiveBaseName.set("geyser-neoforge")
|
|
|
|
}
|
2024-10-31 11:24:54 +01:00
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
// Without this, jackson's service files are not relocated
|
|
|
|
mergeServiceFiles()
|
|
|
|
}
|
2024-02-23 17:58:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
modrinth {
|
|
|
|
loaders.add("neoforge")
|
2024-06-17 21:31:54 +02:00
|
|
|
uploadFile.set(tasks.getByPath("remapModrinthJar"))
|
2024-07-31 19:21:29 +02:00
|
|
|
}
|