Created
October 27, 2019 20:52
-
-
Save romixch/8f5dbcbb473d499c67eae1fbf34007bb to your computer and use it in GitHub Desktop.
Fix start script for windows generated by gradle application plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks.withType<CreateStartScripts>(CreateStartScripts::class.java) { | |
doLast { | |
var text = windowsScript.readText() | |
text = text.replaceFirst(Regex("(set CLASSPATH=%APP_HOME%\\\\lib\\\\).*"), "set CLASSPATH=%APP_HOME%\\\\lib\\\\*") | |
windowsScript.writeText(text) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you use the application plugin for gradle to generate a distZip, you likely run into errors on Windows. Starting the generated start batch script, shows up
the input line is too long
. This fixes it by using a wildcard in the CLASSPATH to get all jar files in the lib folder.