Fix some lib shading issues
This commit is contained in:
+20
-7
@@ -181,6 +181,8 @@ subprojects { p ->
|
||||
|
||||
// Log4j
|
||||
// TODO: Change to shadowMe later to work in the standalone jar
|
||||
// Note: this cannot be relocated if another log4j library is loaded in the JVM due to class casting issues
|
||||
// We might need to look into creating our own logging interface
|
||||
// We cannot do this now as it would break Quilt
|
||||
implementation("org.apache.logging.log4j:log4j-api:${rootProject.log4j_version}")
|
||||
implementation("org.apache.logging.log4j:log4j-core:${rootProject.log4j_version}")
|
||||
@@ -209,7 +211,6 @@ subprojects { p ->
|
||||
forgeShadowMe("com.github.luben:zstd-jni:${rootProject.zstd_version}") // Zstd
|
||||
forgeShadowMe("org.tukaani:xz:${rootProject.xz_version}") // LZMA
|
||||
|
||||
|
||||
// Remember, for lwjgl dependencies that arent included in Minecraft, you need to also need to add it to the ShadowJar thing
|
||||
forgeShadowMe("org.lwjgl:lwjgl-jawt:${rootProject.lwjgl_version}") {
|
||||
exclude group: "org.lwjgl", module: "lwjgl" // This module is imported by Minecraft so exclude it
|
||||
@@ -274,17 +275,29 @@ subprojects { p ->
|
||||
}
|
||||
def librariesLocation = "distanthorizons.libraries"
|
||||
|
||||
// SVG (not needed atm)
|
||||
// relocate "com.kitfox.svg", "${librariesLocation}.kitfox.svg"
|
||||
// LWJGL
|
||||
// Only ever shadow the dependencies we use otherwise some stuff would break when running on an external client
|
||||
relocate "org.lwjgl.system.jawt", "${librariesLocation}.lwjgl.system.jawt"
|
||||
|
||||
// Compression (LZ4)
|
||||
relocate "net.jpountz", "${librariesLocation}.jpountz"
|
||||
relocate "com.github.luben", "${librariesLocation}.github.luben"
|
||||
relocate "org.tukaani", "${librariesLocation}.tukaani"
|
||||
// Compression
|
||||
relocate "net.jpountz", "${librariesLocation}.jpountz" // LZ4
|
||||
relocate "com.github.luben", "${librariesLocation}.github.luben" // ZStd
|
||||
relocate "org.tukaani", "${librariesLocation}.tukaani" // XZ / LZMA
|
||||
|
||||
// night config
|
||||
relocate "com.electronwill.nightconfig", "${librariesLocation}.electronwill.nightconfig"
|
||||
|
||||
// JOML
|
||||
if (project.hasProperty("embed_joml") && embed_joml == "true")
|
||||
relocate "org.joml", "${librariesLocation}.joml"
|
||||
|
||||
// FastUtil
|
||||
relocate "it.unimi.dsi.fastutil", "${librariesLocation}.unimi.dsi.fastutil"
|
||||
|
||||
// Log4j
|
||||
// can't be relocated due to reflection done on Log4j's side
|
||||
//relocate "org.apache.logging", "${librariesLocation}.apache.logging"
|
||||
|
||||
mergeServiceFiles()
|
||||
}
|
||||
// Using jar.finalizedBy(shadowJar) causes issues so we do this scuffed bypass
|
||||
|
||||
+1
-1
Submodule coreSubProjects updated: 2298ef0e0d...23e857a20d
+1
-1
@@ -28,7 +28,7 @@ fastutil_version=8.5.13
|
||||
#svgSalamander_version=1.1.3
|
||||
|
||||
# Minecraft related libaries (included in MC's jar)
|
||||
log4j_version=2.20.0
|
||||
log4j_version=2.23.1
|
||||
netty_version=4.1.94.Final
|
||||
lwjgl_version=3.3.1
|
||||
joml_version=1.10.2
|
||||
|
||||
Reference in New Issue
Block a user