Remove jzlib

Netty now no longer advertises it supports custom compression windows
when jzlib is not available[^1], so we no longer need this.

[^1]: https://github.com/netty/netty/commit/778ba3e54e0694c4dd6b82773c5ab9f569e9afa0
This commit is contained in:
Jonathan Coates
2025-12-17 13:12:31 +00:00
parent a072b116fa
commit a8032d6c65
4 changed files with 3 additions and 34 deletions
-4
View File
@@ -30,7 +30,6 @@ cobalt = { strictly = "0.9.7" }
commonsCli = "1.10.0"
jetbrainsAnnotations = "26.0.2-1"
jspecify = "1.0.0"
jzlib = "1.1.3"
kotlin = "2.2.21"
kotlin-coroutines = "1.10.2"
nightConfig = "3.8.3"
@@ -70,7 +69,6 @@ lwjgl = "3.3.6"
minotaur = "2.8.7"
modDevGradle = "2.0.122"
nullAway = "0.12.14"
shadow = "9.2.2"
spotless = "8.0.0"
teavm = "0.13.0-SQUID.2"
vanillaExtract = "0.3.1"
@@ -89,7 +87,6 @@ neoMergeTool = { module = "net.neoforged:mergetool", version.ref = "neoMergeTool
guava = { module = "com.google.guava:guava", version.ref = "guava" }
jetbrainsAnnotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" }
jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" }
jzlib = { module = "com.jcraft:jzlib", version.ref = "jzlib" }
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
kotlin-platform = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
@@ -172,7 +169,6 @@ yarn = { module = "net.fabricmc:yarn", version.ref = "yarn" }
githubRelease = { id = "com.github.breadmoirai.github-release", version.ref = "githubRelease" }
gradleVersions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersions" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" }
[bundles]
-21
View File
@@ -9,7 +9,6 @@ plugins {
`java-library`
`java-test-fixtures`
kotlin("jvm")
alias(libs.plugins.shadow)
id("cc-tweaked.java-convention")
id("cc-tweaked.publishing")
@@ -23,7 +22,6 @@ dependencies {
implementation(libs.cobalt)
implementation(libs.fastutil)
implementation(libs.guava)
implementation(libs.jzlib)
implementation(libs.netty.http)
implementation(libs.netty.socks)
implementation(libs.netty.proxy)
@@ -62,22 +60,3 @@ val checkChangelog by tasks.registering(cc.tweaked.gradle.CheckChangelog::class)
tasks.check { dependsOn(checkChangelog) }
cct.linters(minecraft = false, loader = null)
// We configure the shadow jar to ship netty-codec and all its dependencies, relocating them under the
// dan200.computercraft.core package.
// This is used as part of the Forge build, so that our version of netty-codec is loaded under the GAME layer, and so
// has access to our jar-in-jar'ed jzlib.
tasks.shadowJar {
minimize()
dependencies {
include(dependency(libs.netty.codec.get()))
include(dependency(libs.netty.http.get()))
include(dependency(libs.netty.socks.get()))
include(dependency(libs.netty.proxy.get()))
}
for (pkg in listOf("io.netty.handler.codec", "io.netty.handler.proxy")) {
relocate(pkg, "dan200.computercraft.core.vendor.$pkg")
}
}
-2
View File
@@ -89,8 +89,6 @@ dependencies {
"modTestWithIris"(libs.sodium.fabric)
"includeRuntimeOnly"(libs.cobalt)
"includeRuntimeOnly"(libs.jzlib)
"includeRuntimeOnly"(libs.netty.http)
"includeRuntimeOnly"(libs.netty.socks)
"includeRuntimeOnly"(libs.netty.proxy)
+3 -7
View File
@@ -157,7 +157,8 @@ dependencies {
clientImplementation(clientClasses(project(":forge-api")))
jarJar(libs.cobalt)
jarJar(libs.jzlib)
jarJar(libs.netty.socks)
jarJar(libs.netty.proxy)
testFixturesApi(libs.bundles.test)
testFixturesApi(libs.bundles.kotlin)
@@ -194,12 +195,7 @@ tasks.jar {
// Include all classes from other projects except core.
val coreSources = project(":core").sourceSets["main"]
for (source in cct.sourceDirectories.get()) {
if (source.classes && source.sourceSet != coreSources) from(source.sourceSet.output)
}
// Include core separately, along with the relocated netty classes.
from(zipTree(project(":core").tasks.named("shadowJar", AbstractArchiveTask::class).map { it.archiveFile })) {
exclude("META-INF/**")
if (source.classes) from(source.sourceSet.output)
}
}