When the gradle application plugin generates the startScripts, it generates for both windows and linux. Is there a way to exclude the windows script from going to bin/ when running distZip task?
You can run gradle installDist to create an image of the application in build/install/projectName . You can run gradle distZip to create a ZIP containing the distribution, gradle distTar to create an application TAR or gradle assemble to build both.
Press ⌃⌃ (macOS), or Ctrl+Ctrl (Windows/Linux), type "gradle" followed by the gradle task name or names. We can, of course, run Gradle commands from the terminal window inside IntelliJ IDEA. Open this with ⌥F12 (macOS), or Alt+F12 (Windows/Linux).
In the Gradle tool window, open the project's node, then the Tasks node and double-click the build task to run it. IntelliJ IDEA creates the build directory that contains our JAR file. You can run the created JAR file in the command line with java -jar command. Check the Run tool window for the results.
It's possible to delete windows script in the doLast
block of the startScrips
task, as:
startScripts {
doLast {
delete windowsScript
}
}
You can use startScripts.enabled = false
in your build.gradle file. Tested with gradle 3.4
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