-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradlew
More file actions
executable file
·73 lines (65 loc) · 2.04 KB
/
gradlew
File metadata and controls
executable file
·73 lines (65 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
################################################################################
##
## Gradle start up script for UN*X
##
################################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname "$PRG"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="-Xmx64m -Xms64m"
# Use the maximum available, or at least 4G for the daemon
if [ -n "$JAVA_OPTS" ]; then
JAVA_OPTS="$JAVA_OPTS -Xmx4096m"
else
JAVA_OPTS="-Xmx4096m"
fi
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/bin/java" ] ; then
# JAVA_HOME is set and points to a valid execution file
JAVACMD="$JAVA_HOME/bin/java"
else
echo
echo "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME"
echo "Please set the JAVA_HOME variable in your environment to match the"
echo "location of your Java installation."
echo
exit 1
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || {
echo
echo "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH."
echo
echo "Please set the JAVA_HOME variable in your environment to match the"
echo "location of your Java installation."
echo
exit 1
}
fi
# Setup the classpath
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Execute Gradle
exec "$JAVACMD" $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"