Feature: JiJ dependencies on modded platforms (#4502)

* Use JiJ inclusion for Fabric/NeoForge to prevent mod conflicts. Further: Don't publish shadow jars to maven.

* Shade and relocate dependencies that don't conform to SemVer on Fabric

* Shade/Relocate dependencies on Fabric to avoid version warnings

* Use relocate function from the build-logic plugin
This commit is contained in:
chris 2024-03-19 23:05:30 +01:00 committed by GitHub
parent b03818a0c4
commit 867cf6da05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 117 additions and 60 deletions

View file

@ -2,11 +2,17 @@ plugins {
application
}
// This is provided by "org.cloudburstmc.math.mutable" too, so yeet.
// NeoForge's class loader is *really* annoying.
provided("org.cloudburstmc.math", "api")
architectury {
platformSetupLoomIde()
neoForge()
}
val includeTransitive: Configuration = configurations.getByName("includeTransitive")
dependencies {
// See https://github.com/google/guava/issues/6618
modules {
@ -21,12 +27,9 @@ dependencies {
shadow(project(path = ":mod", configuration = "transformProductionNeoForge")) {
isTransitive = false
}
shadow(projects.core) {
exclude(group = "com.google.guava", module = "guava")
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "org.slf4j")
exclude(group = "io.netty.incubator")
}
shadow(project(path = ":core")) { isTransitive = false }
includeTransitive(projects.core)
}
application {
@ -34,10 +37,6 @@ application {
}
tasks {
shadowJar {
relocate("it.unimi.dsi.fastutil", "org.geysermc.relocate.fastutil")
}
remapJar {
archiveBaseName.set("Geyser-NeoForge")
}