I am trying to create an executable with Launch4J with my obfuscated jar but I have a problem. Every time I run the createEXE task via Gradle, the shadowJar task also runs causing my obfuscated jar to be overwritten.
How to I use my obfuscated jar with Launch4J's createExe task? Otherwise how do I stop shadowJar from running during the execution of createExe?
Here is my Launch4J task:
launch4j {
jar = "${projectDir}/build/libs/plugin.jar"
outfile = 'Plugin.exe'
icon = "${projectDir}/etc/icon.ico"
mainClassName = 'plugin.Driver'
bundledJrePath = './jre'
jreMinVersion = '1.8.0_161'
jdkPreference = 'preferJdk'
}
You should just ignore the
shadowJartask using the-xoption. It tells Gradle to skip the specified task.You can also do permanently like that :