Skip to content

Commit

Permalink
Minimize packaged jar
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiinaSekiu committed Sep 11, 2024
1 parent c0d31b5 commit fa7eba2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins {
application
kotlin("jvm") version "2.0.20"
kotlin("plugin.serialization") version "2.0.20"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradleup.shadow") version "8.3.0"
id("io.ktor.plugin") version "3.0.0-beta-2"
id("org.panteleyev.jpackageplugin") version "1.6.0"
id("com.github.gmazzo.buildconfig") version "5.4.0"
Expand Down Expand Up @@ -231,6 +231,17 @@ tasks.processResources {
from(buildPath.resolve("languages.zip"))
}

tasks.shadowJar {
minimize {
exclude(dependency("ch.qos.logback:logback-classic:.*"))
exclude(dependency("net.java.dev.jna:jna:.*"))
exclude(dependency("com.formdev:flatlaf-intellij-themes:.*"))
exclude(dependency("com.twelvemonkeys.imageio:.*:.*"))
exclude(dependency("io.ktor:ktor-client-cio:.*"))
exclude(dependency("com.github.jai-imageio:jai-imageio-core:.*"))
}
}

tasks.jpackage {
group = "Package"
dependsOn("setupjpackage")
Expand Down

0 comments on commit fa7eba2

Please sign in to comment.