Skip to content

Commit

Permalink
Further reduce the final jar size
Browse files Browse the repository at this point in the history
  • Loading branch information
r4g3baby committed Feb 5, 2022
1 parent cd12157 commit 410a0f9
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,21 @@ tasks {
shadowJar {
archiveFileName.set("${project.name}-${project.version}.jar")

val shaded = "${project.group}.${project.name.toLowerCase()}.shaded"
relocate("org.codemc.worldguardwrapper", "$shaded.worldguardwrapper")
relocate("net.swiftzer.semver", "$shaded.semver")
relocate("org.bstats", "$shaded.bstats")
relocate("com.zaxxer.hikari", "$shaded.hikari")
relocate("org.slf4j", "$shaded.slf4j")
relocate("org.jetbrains", "$shaded.jetbrains")
relocate("org.intellij", "$shaded.intellij")
relocate("kotlin", "$shaded.kotlin")
val libs = "${project.group}.${project.name.toLowerCase()}.libs"
relocate("org.codemc.worldguardwrapper", "$libs.worldguardwrapper")
relocate("net.swiftzer.semver", "$libs.semver")
relocate("org.bstats", "$libs.bstats")
relocate("com.zaxxer.hikari", "$libs.hikari")
relocate("org.slf4j", "$libs.slf4j")
relocate("org.jetbrains", "$libs.jetbrains")
relocate("org.intellij", "$libs.intellij")
relocate("kotlin", "$libs.kotlin")

dependencies {
exclude("META-INF/maven/**")
exclude("META-INF/versions/**")
exclude("META-INF/**.kotlin_module")
}

minimize()
}
Expand Down

0 comments on commit 410a0f9

Please sign in to comment.