|
1 | 1 | #!/bin/sh
|
2 | 2 |
|
3 | 3 | #
|
4 |
| -# Copyright © 2015-2021 the original authors. |
| 4 | +# Copyright © 2015 the original authors. |
5 | 5 | #
|
6 | 6 | # Licensed under the Apache License, Version 2.0 (the "License");
|
7 | 7 | # you may not use this file except in compliance with the License.
|
|
86 | 86 | # shellcheck disable=SC2034
|
87 | 87 | APP_BASE_NAME=${0##*/}
|
88 | 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
89 |
| -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s |
90 |
| -' "$PWD" ) || exit |
| 89 | +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit |
91 | 90 |
|
92 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
|
93 | 92 | MAX_FD=maximum
|
@@ -115,7 +114,6 @@ case "$( uname )" in #(
|
115 | 114 | NONSTOP* ) nonstop=true ;;
|
116 | 115 | esac
|
117 | 116 |
|
118 |
| -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar |
119 | 117 |
|
120 | 118 |
|
121 | 119 | # Determine the Java command to use to start the JVM.
|
|
173 | 171 | # For Cygwin or MSYS, switch paths to Windows format before running java
|
174 | 172 | if "$cygwin" || "$msys" ; then
|
175 | 173 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
176 |
| - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) |
177 | 174 |
|
178 | 175 | JAVACMD=$( cygpath --unix "$JAVACMD" )
|
179 | 176 |
|
|
206 | 203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
207 | 204 |
|
208 | 205 | # Collect all arguments for the java command:
|
209 |
| -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, |
| 206 | +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, |
210 | 207 | # and any embedded shellness will be escaped.
|
211 | 208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
212 | 209 | # treated as '${Hostname}' itself on the command line.
|
213 | 210 |
|
214 | 211 | set -- \
|
215 | 212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
|
216 |
| - -classpath "$CLASSPATH" \ |
217 |
| - org.gradle.wrapper.GradleWrapperMain \ |
| 213 | + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ |
218 | 214 | "$@"
|
219 | 215 |
|
220 | 216 | # Stop when "xargs" is not available.
|
|
0 commit comments