Skip to content

Commit

Permalink
upgrade to gradle 0.9 preview 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Apr 2, 2010
1 parent 3e12600 commit 6ed2374
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 185 deletions.
50 changes: 31 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import java.text.SimpleDateFormat

defaultTasks "clean", "release"

usePlugin BasePlugin
apply plugin: 'base'

archivesBaseName = 'elasticsearch'

Expand Down Expand Up @@ -69,32 +69,44 @@ task explodedDist(dependsOn: [configurations.distLib], description: 'Builds a mi
ant.chmod(dir: "$explodedDistDir/bin", perm: "ugo+rx", includes: "**/*")
}

task zip(type: Zip) {
dependsOn explodedDist
// classifier = 'all'
}

zip.doFirst {task ->
task zip(type: Zip, dependsOn: ['explodedDist']) {
zipRootFolder = "$archivesBaseName-${-> version}"
task.configure {
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) {
exclude 'bin/*'
}
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder, fileMode: '775') {
include 'bin/*'
exclude 'bin/*.*'
}
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) {
include 'bin/*.*'
}
from(explodedDistDir) {
into zipRootFolder
exclude 'bin/*'
}
from(explodedDistDir) {
into zipRootFolder
include 'bin/*'
exclude 'bin/*.*'
fileMode: '775'
}
from(explodedDistDir) {
into zipRootFolder
include 'bin/*.*'
}
}

//zip.doFirst {task ->
// task.configure {
// zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) {
// exclude 'bin/*'
// }
// zipFileSet(dir: explodedDistDir, prefix: zipRootFolder, fileMode: '775') {
// include 'bin/*'
// exclude 'bin/*.*'
// }
// zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) {
// include 'bin/*.*'
// }
// }
//}
//
task release(dependsOn: [zip, ":plugins-attachments:release"]) << {
ant.delete(dir: explodedDistDir)
}

task wrapper(type: Wrapper) {
gradleVersion = '0.8'
gradleVersion = '0.9-preview-1'
jarPath = 'gradle'
}
Binary file modified gradle/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Sun Dec 13 20:16:46 IST 2009
#Fri Apr 02 15:36:16 IDT 2010
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionVersion=0.8
distributionVersion=0.9-preview-1
zipStorePath=wrapper/dists
urlRoot=http\:https://dist.codehaus.org/gradle
distributionName=gradle
Expand Down
12 changes: 9 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
# JAVA_OPTS="$JAVA_OPTS -Xmx512"

GRADLE_APP_NAME=Gradle

warn ( ) {
echo "${PROGNAME}: $*"
}
Expand Down Expand Up @@ -60,7 +62,7 @@ if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

STARTER_MAIN_CLASS=org.gradle.wrapper.WrapperMain
STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
CLASSPATH=`dirname "$0"`/gradle/gradle-wrapper.jar
WRAPPER_PROPERTIES=`dirname "$0"`/gradle/gradle-wrapper.properties
# Determine the Java command to use to start the JVM.
Expand All @@ -83,10 +85,15 @@ if [ -z "$JAVA_HOME" ] ; then
warn "JAVA_HOME environment variable is not set"
fi

# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
if $darwin; then
JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
# we may also want to set -Xdock:image
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
TOOLS_JAR=`cygpath --path --mixed "$TOOLS_JAR"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

# We build the pattern for arguments to be converted via cygpath
Expand Down Expand Up @@ -130,7 +137,6 @@ fi

"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
-classpath "$CLASSPATH" \
-Dtools.jar="$TOOLS_JAR" \
-Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
$STARTER_MAIN_CLASS \
"$@"
251 changes: 125 additions & 126 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,127 +1,126 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem ##
@rem Gradle startup script for Windows ##
@rem ##
@rem ##########################################################################

@rem
@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
@rem

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.\

@rem Determine the command interpreter to execute the "CD" later
set COMMAND_COM="cmd.exe"
if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"

@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
set FIND_EXE="find.exe"
if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"

:check_JAVA_HOME
@rem Make sure we have a valid JAVA_HOME
if not "%JAVA_HOME%" == "" goto have_JAVA_HOME

echo.
echo ERROR: Environment variable JAVA_HOME has not been set.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end

:have_JAVA_HOME
@rem Validate JAVA_HOME
%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
if not errorlevel 1 goto init

echo.
echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation if there are problems.
echo.

:init
@rem get name of script to launch with full path
@rem Get command-line arguments, handling Windowz variants
SET _marker=%JAVA_HOME: =%
@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args

IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args

set _FIXPATH=
call :fixpath "%JAVA_HOME%"
set JAVA_HOME=%_FIXPATH:~1%

goto win9xME_args

:fixpath
if not %1.==. (
for /f "tokens=1* delims=;" %%a in (%1) do (
call :shortfilename "%%a" & call :fixpath "%%b"
)
)
goto :EOF
:shortfilename
for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
goto :EOF


:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set STARTER_MAIN_CLASS=org.gradle.wrapper.WrapperMain
set CLASSPATH=%DIRNAME%\gradle\gradle-wrapper.jar
set WRAPPER_PROPERTIES=%DIRNAME%\gradle\gradle-wrapper.properties
set JAVA_EXE=%JAVA_HOME%\bin\java.exe
set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar

set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dtools.jar="%TOOLS_JAR%" -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"

"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1

rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
exit /b "%ERRORLEVEL%"

:mainEnd
if "%OS%"=="Windows_NT" endlocal

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem ##
@rem Gradle startup script for Windows ##
@rem ##
@rem ##########################################################################

@rem
@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
@rem

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.\

@rem Determine the command interpreter to execute the "CD" later
set COMMAND_COM="cmd.exe"
if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"

@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
set FIND_EXE="find.exe"
if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"

:check_JAVA_HOME
@rem Make sure we have a valid JAVA_HOME
if not "%JAVA_HOME%" == "" goto have_JAVA_HOME

echo.
echo ERROR: Environment variable JAVA_HOME has not been set.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end

:have_JAVA_HOME
@rem Validate JAVA_HOME
%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
if not errorlevel 1 goto init

echo.
echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation if there are problems.
echo.

:init
@rem get name of script to launch with full path
@rem Get command-line arguments, handling Windowz variants
SET _marker=%JAVA_HOME: =%
@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args

IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args

set _FIXPATH=
call :fixpath "%JAVA_HOME%"
set JAVA_HOME=%_FIXPATH:~1%

goto win9xME_args

:fixpath
if not %1.==. (
for /f "tokens=1* delims=;" %%a in (%1) do (
call :shortfilename "%%a" & call :fixpath "%%b"
)
)
goto :EOF
:shortfilename
for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
goto :EOF


:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
set CLASSPATH=%DIRNAME%\gradle\gradle-wrapper.jar
set WRAPPER_PROPERTIES=%DIRNAME%\gradle\gradle-wrapper.properties
set JAVA_EXE=%JAVA_HOME%\bin\java.exe

set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"

"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1

rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
exit /b "%ERRORLEVEL%"

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
8 changes: 4 additions & 4 deletions modules/benchmark/micro/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependsOn(':elasticsearch')

usePlugin 'java'
apply plugin: 'java'

archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName"

Expand All @@ -20,7 +20,7 @@ dependencies {

test {
useTestNG()
options.suiteName = project.name
options.listeners = ["org.elasticsearch.util.testng.Listeners"]
options.systemProperties = ["es.test.log.conf": System.getProperty("es.test.log.conf", "log4j-gradle.properties")]
suiteName = project.name
listeners = ["org.elasticsearch.util.testng.Listeners"]
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
}
Loading

0 comments on commit 6ed2374

Please sign in to comment.