mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 19:50:31 +00:00
Bundle jzlib with our published jar
Netty requires this for handling compressed websockets with non-default compression arguments. Closes #1394
This commit is contained in:
parent
e655c6d302
commit
f93a33aa5e
@ -20,10 +20,12 @@ asm = "9.3"
|
|||||||
autoService = "1.0.1"
|
autoService = "1.0.1"
|
||||||
checkerFramework = "3.32.0"
|
checkerFramework = "3.32.0"
|
||||||
cobalt = "0.7.0"
|
cobalt = "0.7.0"
|
||||||
|
cobalt-next = "0.7.1" # Not a real version, used to constrain the version we accept.
|
||||||
fastutil = "8.5.9"
|
fastutil = "8.5.9"
|
||||||
guava = "31.1-jre"
|
guava = "31.1-jre"
|
||||||
jetbrainsAnnotations = "24.0.1"
|
jetbrainsAnnotations = "24.0.1"
|
||||||
jsr305 = "3.0.2"
|
jsr305 = "3.0.2"
|
||||||
|
jzlib = "1.1.3"
|
||||||
kotlin = "1.8.10"
|
kotlin = "1.8.10"
|
||||||
kotlin-coroutines = "1.6.4"
|
kotlin-coroutines = "1.6.4"
|
||||||
netty = "4.1.82.Final"
|
netty = "4.1.82.Final"
|
||||||
@ -61,7 +63,6 @@ minotaur = "2.+"
|
|||||||
mixinGradle = "0.7.+"
|
mixinGradle = "0.7.+"
|
||||||
nullAway = "0.9.9"
|
nullAway = "0.9.9"
|
||||||
quiltflower = "1.8.0"
|
quiltflower = "1.8.0"
|
||||||
shadow = "7.1.2"
|
|
||||||
spotless = "6.17.0"
|
spotless = "6.17.0"
|
||||||
taskTree = "2.1.1"
|
taskTree = "2.1.1"
|
||||||
vanillaGradle = "0.2.1-SNAPSHOT"
|
vanillaGradle = "0.2.1-SNAPSHOT"
|
||||||
@ -77,8 +78,9 @@ forgeSpi = { module = "net.minecraftforge:forgespi", version.ref = "forgeSpi" }
|
|||||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||||
jetbrainsAnnotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" }
|
jetbrainsAnnotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" }
|
||||||
jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" }
|
jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" }
|
||||||
kotlin-platform = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
|
jzlib = { module = "com.jcraft:jzlib", version.ref = "jzlib" }
|
||||||
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
|
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" }
|
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
|
||||||
netty-http = { module = "io.netty:netty-codec-http", version.ref = "netty" }
|
netty-http = { module = "io.netty:netty-codec-http", version.ref = "netty" }
|
||||||
nightConfig-core = { module = "com.electronwill.night-config:core", version.ref = "nightConfig" }
|
nightConfig-core = { module = "com.electronwill.night-config:core", version.ref = "nightConfig" }
|
||||||
@ -102,8 +104,8 @@ rubidium = { module = "maven.modrinth:rubidium", version.ref = "rubidium" }
|
|||||||
sodium = { module = "maven.modrinth:sodium", version.ref = "sodium" }
|
sodium = { module = "maven.modrinth:sodium", version.ref = "sodium" }
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
byteBuddyAgent = { module ="net.bytebuddy:byte-buddy-agent", version.ref = "byteBuddy" }
|
byteBuddyAgent = { module = "net.bytebuddy:byte-buddy-agent", version.ref = "byteBuddy" }
|
||||||
byteBuddy = { module ="net.bytebuddy:byte-buddy", version.ref = "byteBuddy" }
|
byteBuddy = { module = "net.bytebuddy:byte-buddy", version.ref = "byteBuddy" }
|
||||||
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
|
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
|
||||||
jqwik-api = { module = "net.jqwik:jqwik-api", version.ref = "jqwik" }
|
jqwik-api = { module = "net.jqwik:jqwik-api", version.ref = "jqwik" }
|
||||||
jqwik-engine = { module = "net.jqwik:jqwik-engine", version.ref = "jqwik" }
|
jqwik-engine = { module = "net.jqwik:jqwik-engine", version.ref = "jqwik" }
|
||||||
@ -138,7 +140,6 @@ ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExt"
|
|||||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||||
librarian = { id = "org.parchmentmc.librarian.forgegradle", version.ref = "librarian" }
|
librarian = { id = "org.parchmentmc.librarian.forgegradle", version.ref = "librarian" }
|
||||||
mixinGradle = { id = "org.spongepowered.mixin", version.ref = "mixinGradle" }
|
mixinGradle = { id = "org.spongepowered.mixin", version.ref = "mixinGradle" }
|
||||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
|
||||||
taskTree = { id = "com.dorongold.task-tree", version.ref = "taskTree" }
|
taskTree = { id = "com.dorongold.task-tree", version.ref = "taskTree" }
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
|
@ -19,6 +19,7 @@ dependencies {
|
|||||||
implementation(libs.cobalt)
|
implementation(libs.cobalt)
|
||||||
implementation(libs.fastutil)
|
implementation(libs.fastutil)
|
||||||
implementation(libs.guava)
|
implementation(libs.guava)
|
||||||
|
implementation(libs.jzlib)
|
||||||
implementation(libs.netty.http)
|
implementation(libs.netty.http)
|
||||||
implementation(libs.slf4j)
|
implementation(libs.slf4j)
|
||||||
implementation(libs.asm)
|
implementation(libs.asm)
|
||||||
|
@ -52,6 +52,7 @@ dependencies {
|
|||||||
"modTestWithIris"(libs.sodium)
|
"modTestWithIris"(libs.sodium)
|
||||||
|
|
||||||
include(libs.cobalt)
|
include(libs.cobalt)
|
||||||
|
include(libs.jzlib)
|
||||||
include(libs.netty.http)
|
include(libs.netty.http)
|
||||||
include(libs.nightConfig.core)
|
include(libs.nightConfig.core)
|
||||||
include(libs.nightConfig.toml)
|
include(libs.nightConfig.toml)
|
||||||
|
@ -9,7 +9,6 @@ plugins {
|
|||||||
id("cc-tweaked.forge")
|
id("cc-tweaked.forge")
|
||||||
id("cc-tweaked.gametest")
|
id("cc-tweaked.gametest")
|
||||||
alias(libs.plugins.mixinGradle)
|
alias(libs.plugins.mixinGradle)
|
||||||
alias(libs.plugins.shadow)
|
|
||||||
id("cc-tweaked.illuaminate")
|
id("cc-tweaked.illuaminate")
|
||||||
id("cc-tweaked.mod-publishing")
|
id("cc-tweaked.mod-publishing")
|
||||||
}
|
}
|
||||||
@ -118,10 +117,6 @@ mixin {
|
|||||||
config("computercraft-client.forge.mixins.json")
|
config("computercraft-client.forge.mixins.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
reobf {
|
|
||||||
register("shadowJar")
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
register("cctJavadoc")
|
register("cctJavadoc")
|
||||||
}
|
}
|
||||||
@ -136,14 +131,21 @@ dependencies {
|
|||||||
libs.bundles.externalMods.forge.compile.get().map { compileOnly(fg.deobf(it)) }
|
libs.bundles.externalMods.forge.compile.get().map { compileOnly(fg.deobf(it)) }
|
||||||
libs.bundles.externalMods.forge.runtime.get().map { runtimeOnly(fg.deobf(it)) }
|
libs.bundles.externalMods.forge.runtime.get().map { runtimeOnly(fg.deobf(it)) }
|
||||||
|
|
||||||
// Depend on our other projects. By using the api configuration, shadow jar will correctly
|
// Depend on our other projects.
|
||||||
// preserve all files from forge-api/core-api.
|
|
||||||
api(commonClasses(project(":forge-api")))
|
api(commonClasses(project(":forge-api")))
|
||||||
api(clientClasses(project(":forge-api")))
|
api(clientClasses(project(":forge-api")))
|
||||||
implementation(project(":core"))
|
implementation(project(":core"))
|
||||||
|
|
||||||
minecraftLibrary(libs.cobalt)
|
minecraftEmbed(libs.cobalt) {
|
||||||
minecraftLibrary(libs.netty.http) { isTransitive = false }
|
jarJar.ranged(this, "[${libs.versions.cobalt.asProvider().get()},${libs.versions.cobalt.next.get()})")
|
||||||
|
}
|
||||||
|
minecraftEmbed(libs.jzlib) {
|
||||||
|
jarJar.ranged(this, "[${libs.versions.jzlib.get()},)")
|
||||||
|
}
|
||||||
|
minecraftEmbed(libs.netty.http) {
|
||||||
|
jarJar.ranged(this, "[${libs.versions.netty.get()},)")
|
||||||
|
isTransitive = false
|
||||||
|
}
|
||||||
|
|
||||||
testFixturesApi(libs.bundles.test)
|
testFixturesApi(libs.bundles.test)
|
||||||
testFixturesApi(libs.bundles.kotlin)
|
testFixturesApi(libs.bundles.kotlin)
|
||||||
@ -210,23 +212,16 @@ tasks.sourcesJar {
|
|||||||
for (source in cct.sourceDirectories.get()) from(source.sourceSet.allSource)
|
for (source in cct.sourceDirectories.get()) from(source.sourceSet.allSource)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.shadowJar {
|
tasks.jarJar {
|
||||||
finalizedBy("reobfShadowJar")
|
finalizedBy("reobfJarJar")
|
||||||
archiveClassifier.set("")
|
archiveClassifier.set("")
|
||||||
|
|
||||||
from(sourceSets.client.get().output)
|
for (source in cct.sourceDirectories.get()) {
|
||||||
|
if (source.classes) from(source.sourceSet.output)
|
||||||
dependencies {
|
|
||||||
include(dependency("cc.tweaked:"))
|
|
||||||
include(dependency(libs.cobalt.get()))
|
|
||||||
include(dependency(libs.netty.http.get()))
|
|
||||||
}
|
}
|
||||||
relocate("org.squiddev.cobalt", "cc.tweaked.internal.cobalt")
|
|
||||||
relocate("io.netty.handler.codec.http", "cc.tweaked.internal.netty.codec.http")
|
|
||||||
minimize()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.assemble { dependsOn("shadowJar") }
|
tasks.assemble { dependsOn("jarJar") }
|
||||||
|
|
||||||
// Check tasks
|
// Check tasks
|
||||||
|
|
||||||
@ -285,7 +280,7 @@ tasks.register("checkClient") {
|
|||||||
// Upload tasks
|
// Upload tasks
|
||||||
|
|
||||||
modPublishing {
|
modPublishing {
|
||||||
output.set(tasks.shadowJar)
|
output.set(tasks.jarJar)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't publish the slim jar
|
// Don't publish the slim jar
|
||||||
@ -297,6 +292,10 @@ publishing {
|
|||||||
publications {
|
publications {
|
||||||
named("maven", MavenPublication::class) {
|
named("maven", MavenPublication::class) {
|
||||||
fg.component(this)
|
fg.component(this)
|
||||||
|
// jarJar.component is broken (https://github.com/MinecraftForge/ForgeGradle/issues/914), so declare the
|
||||||
|
// artifact explicitly.
|
||||||
|
artifact(tasks.jarJar)
|
||||||
|
|
||||||
mavenDependencies {
|
mavenDependencies {
|
||||||
exclude(dependencies.create("cc.tweaked:"))
|
exclude(dependencies.create("cc.tweaked:"))
|
||||||
exclude(libs.jei.forge.get())
|
exclude(libs.jei.forge.get())
|
||||||
|
Loading…
Reference in New Issue
Block a user