|
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. |
|
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/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt |
59 | | -# within the Gradle project. |
| 60 | +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt |
60 | 61 | # |
61 | 62 | # You can find Gradle at https://github.com/gradle/gradle/. |
62 | 63 | # |
|
80 | 81 | esac |
81 | 82 | done |
82 | 83 |
|
83 | | -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit |
84 | | - |
85 | 84 | APP_NAME="Gradle" |
86 | 85 | APP_BASE_NAME=${0##*/} |
87 | 86 |
|
| 87 | +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit |
| 88 | + |
88 | 89 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
89 | 90 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' |
90 | 91 |
|
@@ -114,7 +115,7 @@ case "$( uname )" in #( |
114 | 115 | NONSTOP* ) nonstop=true ;; |
115 | 116 | esac |
116 | 117 |
|
117 | | -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar |
| 118 | +CLASSPATH="\\\"\\\"" |
118 | 119 |
|
119 | 120 |
|
120 | 121 | # Determine the Java command to use to start the JVM. |
|
160 | 161 | # * -classpath |
161 | 162 | # * -D...appname settings |
162 | 163 | # * --module-path (only if needed) |
163 | | -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. |
| 164 | +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, |
164 | 165 |
|
165 | 166 | # For Cygwin or MSYS, switch paths to Windows format before running java |
166 | 167 | if "$cygwin" || "$msys" ; then |
|
202 | 203 | set -- \ |
203 | 204 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ |
204 | 205 | -classpath "$CLASSPATH" \ |
205 | | - org.gradle.wrapper.GradleWrapperMain \ |
| 206 | + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ |
206 | 207 | "$@" |
207 | 208 |
|
208 | 209 | # Use "xargs" to parse quoted args. |
|
0 commit comments