Gradle Application Plugin - Do Not Generate Windows Script Launch?

When the gradle application plugin generates startScripts, it generates both for windows and linux. Is there a way to exclude script windows from going to bin / when the distZip task is running?

+4
source share
3 answers

You can remove the script windows in the doLasttask block startScrips, like:

startScripts {
    doLast {
        delete windowsScript
    }
}
+2
source

You can use startScripts.enabled = falsein the build.gradle file. Tested with gradle 3.4

+1
source

exclude distZip build.gradle :

distZip.exclude "**/*.bat"

This excludes all files .batfrom the zip distribution.

0
source

All Articles