I would like to give a custom file name to my batch file inside the archive/distribution when using Gradle's application plugin. Following is the build.gradle file.
apply plugin: 'application'
mainClassName = 'com.org.test.TestMain';
dependencies {
compile group: 'com.oracle', name: 'ojdbc7', version: '+'
}
I would like to rename test.bat to abc_xyz.bat. in the distribution. Can anyone suggest how this can be possible?
Thank you.
Try:
createStartScripts {
applicationName = 'abc_xyz'
}
Not tested it though...
If you're using the Kotlin DSL
tasks.withType<CreateStartScripts> {
applicationName = "blah"
}
would create blah
and blah.bat
. Verified with Gradle 6.6.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With