Skip to content

Commit

Permalink
fix svgs not being loaded while running bot as .jar
Browse files Browse the repository at this point in the history
  • Loading branch information
Punikekk committed Mar 7, 2024
1 parent 2c9f218 commit da8ab2f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ tasks.jar {
}

tasks.register<proguard.gradle.ProGuardTask>("proguard") {
allowaccessmodification()
dontoptimize()
dontobfuscate()
dontnote()
Expand All @@ -93,15 +92,13 @@ tasks.register<proguard.gradle.ProGuardTask>("proguard") {
keep("class com.github.manolo8.** { *; }")
keep("class eu.darkbot.** { *; }")
keep("class com.formdev.** { *; }")
keep("class com.github.weisj.jsvg.** { *; }")

injars(tasks["shadowJar"].outputs.files.singleFile)
outjars("build/DarkBot.jar")

if (JavaVersion.current().isJava9Compatible) {
libraryjars("${System.getProperty("java.home")}/jmods")
} else {
libraryjars("${System.getProperty("java.home")}/lib/rt.jar")
}
libraryjars("${System.getProperty("java.home")}/jmods")
libraryjars(configurations.compileClasspath.get().files)

dependsOn(tasks.build)
}
Expand Down

0 comments on commit da8ab2f

Please sign in to comment.