1 #!/usr/bin/env sh
3 ##############################################################################
4 ##
5 ## Gradle start up script for UN*X
6 ##
7 ##############################################################################
9 # Attempt to set APP_HOME
10 # Resolve links: $0 may be a link
12 # Need this for relative symlinks.
18 else
20 fi
21 done
30 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 # Use the maximum available, or set MAX_FD != -1 to use that value.
36 warn ( ) {
38 }
40 die ( ) {
41 echo
43 echo
45 }
47 # OS specific support (must be 'true' or 'false').
48 cygwin=false
49 msys=false
50 darwin=false
51 nonstop=false
53 CYGWIN* )
54 cygwin=true
55 ;;
56 Darwin* )
57 darwin=true
58 ;;
59 MINGW* )
60 msys=true
61 ;;
62 NONSTOP* )
63 nonstop=true
64 ;;
65 esac
69 # Determine the Java command to use to start the JVM.
72 # IBM's JDK on AIX uses strange locations for the executables
74 else
76 fi
80 Please set the JAVA_HOME variable in your environment to match the
81 location of your Java installation."
82 fi
83 else
85 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 Please set the JAVA_HOME variable in your environment to match the
88 location of your Java installation."
89 fi
91 # Increase the maximum file descriptors if we can.
97 fi
101 fi
102 else
104 fi
105 fi
107 # For Darwin, add options to specify how the application appears in the dock
109 GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 fi
112 # For Cygwin, switch paths to Windows format before running java
118 # We build the pattern for arguments to be converted via cygpath
124 done
126 # Add a user-defined pattern to the cygpath arguments
129 fi
130 # Now convert the arguments - kludge to limit ourselves to /bin/sh
138 else
140 fi
142 done
154 esac
155 fi
157 # Escape application args
158 save ( ) {
161 }
164 # Collect all arguments for the java command, following the shell quoting and substitution rules
165 eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
167 # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
170 fi