Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Application Plugin - Not generate the windows start script?

Tags:

plugins

gradle

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?

like image 618
adnant Avatar asked Jan 15 '15 16:01

adnant


People also ask

What does Gradlew installDist do?

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.

How do I run Gradle from command prompt?

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).

How do I run a Gradle application?

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.


2 Answers

It's possible to delete windows script in the doLast block of the startScrips task, as:

startScripts {
    doLast {
        delete windowsScript
    }
}
like image 155
Stanislav Avatar answered Nov 15 '22 04:11

Stanislav


You can use startScripts.enabled = false in your build.gradle file. Tested with gradle 3.4

like image 23
Raja Selvaraj Avatar answered Nov 15 '22 03:11

Raja Selvaraj