Shade LinBus in -libs (#2172)

* Shade LinBus in -libs

* exclude linbus from -mod jar dupe
This commit is contained in:
Maddy Miller 2022-08-28 18:01:29 +10:00 committed by GitHub
parent b3962d8b41
commit 5db6ebc9c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -16,6 +16,7 @@
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.exclude
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.named
@ -87,6 +88,10 @@
from({
altConfigFiles("sources")
})
// Yeet module-info's
exclude("module-info.java")
relocations.forEach { (from, to) ->
val filePattern = Regex("(.*)${from.replace('.', '/')}((?:/|$).*)")
val textPattern = Regex.fromLiteral(from)

View File

@ -9,4 +9,9 @@
"shade"("org.enginehub.piston:core:${Versions.PISTON}")
"shade"("org.enginehub.piston.core-ap:runtime:${Versions.PISTON}")
"shade"("org.enginehub.piston:default-impl:${Versions.PISTON}")
// Linbus
"shade"("org.enginehub.lin-bus:lin-bus-common:${Versions.LIN_BUS}")
"shade"("org.enginehub.lin-bus:lin-bus-stream:${Versions.LIN_BUS}")
"shade"("org.enginehub.lin-bus:lin-bus-tree:${Versions.LIN_BUS}")
"shade"("org.enginehub.lin-bus.format:lin-bus-format-snbt:${Versions.LIN_BUS}")
}

View File

@ -25,6 +25,7 @@
exclude("com/thoughtworks/")
exclude("net/royawesome/")
exclude("org/enginehub/piston/")
exclude("org/enginehub/linbus/")
exclude("net/kyori/examination/")
// Exclude worldedit-core
exclude {