|
15 | 15 | # See the License for the specific language governing permissions and
|
16 | 16 | # limitations under the License.
|
17 | 17 | #
|
| 18 | +# SPDX-License-Identifier: Apache-2.0 |
| 19 | +# |
18 | 20 |
|
19 | 21 | ##############################################################################
|
20 | 22 | #
|
|
55 | 57 | # Darwin, MinGW, and NonStop.
|
56 | 58 | #
|
57 | 59 | # (3) This script is generated from the Groovy template
|
58 |
| -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt |
| 60 | +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt |
59 | 61 | # within the Gradle project.
|
60 | 62 | #
|
61 | 63 | # You can find Gradle at https://github.com/gradle/gradle/.
|
|
84 | 86 | # shellcheck disable=SC2034
|
85 | 87 | APP_BASE_NAME=${0##*/}
|
86 | 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
87 |
| -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit |
| 89 | +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit |
88 | 90 |
|
89 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
|
90 | 92 | MAX_FD=maximum
|
@@ -112,20 +114,7 @@ case "$( uname )" in #(
|
112 | 114 | NONSTOP* ) nonstop=true ;;
|
113 | 115 | esac
|
114 | 116 |
|
115 |
| - |
116 |
| -# Loop in case we encounter an error. |
117 |
| -for attempt in 1 2 3; do |
118 |
| - if [ ! -e "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" ]; then |
119 |
| - if ! curl -s -S --retry 3 -L -o "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" "https://raw.githubusercontent.com/gradle/gradle/v8.14.1/gradle/wrapper/gradle-wrapper.jar"; then |
120 |
| - rm -f "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" |
121 |
| - # Pause for a bit before looping in case the server throttled us. |
122 |
| - sleep 5 |
123 |
| - continue |
124 |
| - fi |
125 |
| - fi |
126 |
| -done |
127 |
| - |
128 |
| -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar |
| 117 | +CLASSPATH="\\\"\\\"" |
129 | 118 |
|
130 | 119 |
|
131 | 120 | # Determine the Java command to use to start the JVM.
|
@@ -212,19 +201,32 @@ if "$cygwin" || "$msys" ; then
|
212 | 201 | fi
|
213 | 202 |
|
214 | 203 |
|
| 204 | + |
| 205 | +# Loop in case we encounter an error. |
| 206 | +for attempt in 1 2 3; do |
| 207 | + if [ ! -e "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" ]; then |
| 208 | + if ! curl -s -S --retry 3 -L -o "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" "https://raw.githubusercontent.com/gradle/gradle/v8.14.1/gradle/wrapper/gradle-wrapper.jar"; then |
| 209 | + rm -f "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" |
| 210 | + # Pause for a bit before looping in case the server throttled us. |
| 211 | + sleep 5 |
| 212 | + continue |
| 213 | + fi |
| 214 | + fi |
| 215 | +done |
| 216 | + |
215 | 217 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
216 | 218 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
217 | 219 |
|
218 | 220 | # Collect all arguments for the java command:
|
219 |
| -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, |
| 221 | +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, |
220 | 222 | # and any embedded shellness will be escaped.
|
221 | 223 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
222 | 224 | # treated as '${Hostname}' itself on the command line.
|
223 | 225 |
|
224 | 226 | set -- \
|
225 | 227 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
|
226 | 228 | -classpath "$CLASSPATH" \
|
227 |
| - org.gradle.wrapper.GradleWrapperMain \ |
| 229 | + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ |
228 | 230 | "$@"
|
229 | 231 |
|
230 | 232 | # Stop when "xargs" is not available.
|
|
0 commit comments