gradle-launch4j
gradle-launch4j copied to clipboard
how to change jar file location in version 3.0.5
I'm trying to change the jar location that the exe is trying to launch. Essentially trying to change it so that the exe looks for the jar in the same directory as it instead of lib/foo.jar
.
I've noticed that the jar
property got removed, which does what I'm trying to do. Is there an alternative way to do this? This is still possible using the Launch4j software. Maybe I'm not setting the jarTask
correctly.
See below for a snippet of my build.gradle
launch4j {
jarTask = project.getTasksByName("buildJar", false)[0]
dontWrapJar = true
outfile = "Foo.exe"
bundledJrePath = "./jre/${jreImageName}"
requires64Bit = true
icon = "${projectDir}/img/icons/foo.ico"
}
task buildJar(type: Jar) {
description 'Foo in releaseDir'
from sourceSets.main.output
manifest {
attributes 'Main-Class': project.mainClass
attributes 'Class-Path': './config/'
}
archiveBaseName = 'Foo'
destinationDirectory = new File(releaseDir)
}