feat(build): minimize jar
This commit is contained in:
parent
e5ce8bde1a
commit
a3227dfb94
1 changed files with 10 additions and 2 deletions
|
@ -69,13 +69,14 @@ tasks.processResources {
|
||||||
tasks {
|
tasks {
|
||||||
named<ShadowJar>("shadowJar") {
|
named<ShadowJar>("shadowJar") {
|
||||||
mustRunAfter(test)
|
mustRunAfter(test)
|
||||||
|
configurations = listOf(shadowImplementation)
|
||||||
|
|
||||||
|
// NAMING
|
||||||
archiveBaseName.set("nicko")
|
archiveBaseName.set("nicko")
|
||||||
archiveVersion.set(version.toString())
|
archiveVersion.set(version.toString())
|
||||||
archiveAppendix.set("")
|
archiveAppendix.set("")
|
||||||
archiveClassifier.set("")
|
archiveClassifier.set("")
|
||||||
|
|
||||||
configurations = listOf(shadowImplementation)
|
|
||||||
|
|
||||||
// RELOCATIONS
|
// RELOCATIONS
|
||||||
relocate("xyz.xenondevs", "xyz.ineanto.nicko.libs.invui")
|
relocate("xyz.xenondevs", "xyz.ineanto.nicko.libs.invui")
|
||||||
relocate("me.clip", "xyz.ineanto.nicko.libs.placeholderapi")
|
relocate("me.clip", "xyz.ineanto.nicko.libs.placeholderapi")
|
||||||
|
@ -89,6 +90,7 @@ tasks {
|
||||||
relocate("com.google.gson", "xyz.ineanto.nicko.libs.gson")
|
relocate("com.google.gson", "xyz.ineanto.nicko.libs.gson")
|
||||||
relocate("org.apache.commons.pool2", "xyz.ineanto.nicko.libs.pool2")
|
relocate("org.apache.commons.pool2", "xyz.ineanto.nicko.libs.pool2")
|
||||||
|
|
||||||
|
// EXCLUSIONS
|
||||||
exclude("colors.bin")
|
exclude("colors.bin")
|
||||||
exclude("waffle/**")
|
exclude("waffle/**")
|
||||||
exclude("com/sun/**")
|
exclude("com/sun/**")
|
||||||
|
@ -104,6 +106,12 @@ tasks {
|
||||||
exclude("org/yaml/**")
|
exclude("org/yaml/**")
|
||||||
exclude("google/protobuf/**")
|
exclude("google/protobuf/**")
|
||||||
exclude("net/kyori/**")
|
exclude("net/kyori/**")
|
||||||
|
|
||||||
|
// MINIFY
|
||||||
|
minimize {
|
||||||
|
exclude(dependency("xyz.xenondevs.invui:.*"))
|
||||||
|
exclude(dependency("net.wesjd:.*"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue