Skip to content
This repository
Browse code

update Gradle support

  • Loading branch information...
commit 12a1a70d39dc5d4ac793d05fb478a32e4308e6a9 1 parent f3a5d62
Alan Krueger authored
5  build.gradle
@@ -25,3 +25,8 @@ uploadArchives {
25 25
     }
26 26
 }
27 27
 */
  28
+
  29
+task createWrapper(type: Wrapper) {
  30
+    gradleVersion = '1.0-milestone-6'
  31
+}
  32
+
BIN  gradle/wrapper/gradle-wrapper.jar
Binary file not shown
7  gradle/wrapper/gradle-wrapper.properties
... ...
@@ -1,9 +1,6 @@
1  
-#Mon Jan 18 09:35:53 CET 2010
  1
+#Fri Dec 23 12:54:50 CST 2011
2 2
 distributionBase=GRADLE_USER_HOME
3 3
 distributionPath=wrapper/dists
4 4
 zipStoreBase=GRADLE_USER_HOME
5  
-distributionVersion=0.9-preview-3
6 5
 zipStorePath=wrapper/dists
7  
-urlRoot=http\://dist.codehaus.org/gradle/
8  
-distributionName=gradle
9  
-distributionClassifier=bin
  6
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-6-bin.zip
40  gradlew 100755 → 100644
@@ -7,21 +7,25 @@
7 7
 ##############################################################################
8 8
 
9 9
 # Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
10  
-GRADLE_OPTS="$GRADLE_OPTS -Xmx1024m"
11  
-# JAVA_OPTS="$JAVA_OPTS -Xmx512"
  10
+# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
  11
+# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
12 12
 
13 13
 GRADLE_APP_NAME=Gradle
14 14
 
  15
+# Use the maximum available, or set MAX_FD != -1 to use that value.
  16
+MAX_FD="maximum"
  17
+
15 18
 warn ( ) {
16  
-    echo "${PROGNAME}: $*"
  19
+    echo "$*"
17 20
 }
18 21
 
19 22
 die ( ) {
20  
-    warn "$*"
  23
+    echo
  24
+    echo "$*"
  25
+    echo
21 26
     exit 1
22 27
 }
23 28
 
24  
-
25 29
 # OS specific support (must be 'true' or 'false').
26 30
 cygwin=false
27 31
 msys=false
@@ -79,12 +83,31 @@ if [ -z "$JAVACMD" ] ; then
79 83
     fi
80 84
 fi
81 85
 if [ ! -x "$JAVACMD" ] ; then
82  
-    die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
  86
+    die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
  87
+
  88
+Please set the JAVA_HOME variable in your environment to match the
  89
+location of your Java installation."
83 90
 fi
84 91
 if [ -z "$JAVA_HOME" ] ; then
85 92
     warn "JAVA_HOME environment variable is not set"
86 93
 fi
87 94
 
  95
+# Increase the maximum file descriptors if we can.
  96
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
  97
+    MAX_FD_LIMIT=`ulimit -H -n`
  98
+    if [ $? -eq 0 ] ; then
  99
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
  100
+            MAX_FD="$MAX_FD_LIMIT"
  101
+        fi
  102
+        ulimit -n $MAX_FD
  103
+        if [ $? -ne 0 ] ; then
  104
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
  105
+        fi
  106
+    else
  107
+        warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
  108
+    fi
  109
+fi
  110
+
88 111
 # For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
89 112
 if $darwin; then
90 113
     JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
@@ -135,8 +158,11 @@ if $cygwin ; then
135 158
     esac
136 159
 fi
137 160
 
138  
-"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
  161
+GRADLE_APP_BASE_NAME=`basename "$0"`
  162
+
  163
+exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
139 164
         -classpath "$CLASSPATH" \
  165
+        -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
140 166
         -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
141 167
         $STARTER_MAIN_CLASS \
142 168
         "$@"
64  gradlew.bat
@@ -5,83 +5,39 @@
5 5
 @rem                                                                         ##
6 6
 @rem ##########################################################################
7 7
 
8  
-@rem
9  
-@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
10  
-@rem
11  
-
12 8
 @rem Set local scope for the variables with windows NT shell
13 9
 if "%OS%"=="Windows_NT" setlocal
14 10
 
15 11
 @rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
16  
-@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512
17  
-@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512
  12
+@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
  13
+@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
18 14
 
19 15
 set DIRNAME=%~dp0
20 16
 if "%DIRNAME%" == "" set DIRNAME=.\
21 17
 
22  
-@rem Determine the command interpreter to execute the "CD" later
23  
-set COMMAND_COM="cmd.exe"
24  
-if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
25  
-if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
  18
+@rem Find java.exe
  19
+set JAVA_EXE=java.exe
  20
+if not defined JAVA_HOME goto init
26 21
 
27  
-@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
28  
-set FIND_EXE="find.exe"
29  
-if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
30  
-if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
  22
+set JAVA_HOME=%JAVA_HOME:"=%
  23
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
31 24
 
32  
-:check_JAVA_HOME
33  
-@rem Make sure we have a valid JAVA_HOME
34  
-if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
  25
+if exist "%JAVA_EXE%" goto init
35 26
 
36 27
 echo.
37  
-echo ERROR: Environment variable JAVA_HOME has not been set.
  28
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
38 29
 echo.
39 30
 echo Please set the JAVA_HOME variable in your environment to match the
40 31
 echo location of your Java installation.
41 32
 echo.
42 33
 goto end
43 34
 
44  
-:have_JAVA_HOME
45  
-@rem Validate JAVA_HOME
46  
-%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
47  
-if not errorlevel 1 goto init
48  
-
49  
-echo.
50  
-echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME%
51  
-echo.
52  
-echo Please set the JAVA_HOME variable in your environment to match the
53  
-echo location of your Java installation if there are problems.
54  
-echo.
55  
-
56 35
 :init
57  
-@rem get name of script to launch with full path
58 36
 @rem Get command-line arguments, handling Windowz variants
59  
-SET _marker=%JAVA_HOME: =%
60  
-@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.
61 37
 
62 38
 if not "%OS%" == "Windows_NT" goto win9xME_args
63 39
 if "%eval[2+2]" == "4" goto 4NT_args
64 40
 
65  
-IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args
66  
-
67  
-set _FIXPATH=
68  
-call :fixpath "%JAVA_HOME%"
69  
-set JAVA_HOME=%_FIXPATH:~1%
70  
-
71  
-goto win9xME_args
72  
-
73  
-:fixpath
74  
-if not %1.==. (
75  
-for /f "tokens=1* delims=;" %%a in (%1) do (
76  
-call :shortfilename "%%a" & call :fixpath "%%b"
77  
-)
78  
-)
79  
-goto :EOF
80  
-:shortfilename
81  
-for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
82  
-goto :EOF
83  
-
84  
-
85 41
 :win9xME_args
86 42
 @rem Slurp the command line arguments.
87 43
 set CMD_LINE_ARGS=
@@ -103,10 +59,10 @@ set CMD_LINE_ARGS=%$
103 59
 set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
104 60
 set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar
105 61
 set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties
106  
-set JAVA_EXE=%JAVA_HOME%\bin\java.exe
107 62
 
108 63
 set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
109 64
 
  65
+@rem Execute Gradle
110 66
 "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
111 67
 
112 68
 :end

0 notes on commit 12a1a70

Please sign in to comment.
Something went wrong with that request. Please try again.