upgrade to gradle 0.9 preview 1

This commit is contained in:
kimchy 2010-04-02 15:47:27 +03:00
parent 3e12600520
commit 6ed23744fc
10 changed files with 189 additions and 185 deletions

View File

@ -2,7 +2,7 @@ import java.text.SimpleDateFormat
defaultTasks "clean", "release" defaultTasks "clean", "release"
usePlugin BasePlugin apply plugin: 'base'
archivesBaseName = 'elasticsearch' archivesBaseName = 'elasticsearch'
@ -69,32 +69,44 @@ task explodedDist(dependsOn: [configurations.distLib], description: 'Builds a mi
ant.chmod(dir: "$explodedDistDir/bin", perm: "ugo+rx", includes: "**/*") ant.chmod(dir: "$explodedDistDir/bin", perm: "ugo+rx", includes: "**/*")
} }
task zip(type: Zip) { task zip(type: Zip, dependsOn: ['explodedDist']) {
dependsOn explodedDist
// classifier = 'all'
}
zip.doFirst {task ->
zipRootFolder = "$archivesBaseName-${-> version}" zipRootFolder = "$archivesBaseName-${-> version}"
task.configure { from(explodedDistDir) {
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) { into zipRootFolder
exclude 'bin/*' exclude 'bin/*'
} }
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder, fileMode: '775') { from(explodedDistDir) {
include 'bin/*' into zipRootFolder
exclude 'bin/*.*' include 'bin/*'
} exclude 'bin/*.*'
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) { fileMode: '775'
include 'bin/*.*' }
} 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"]) << { task release(dependsOn: [zip, ":plugins-attachments:release"]) << {
ant.delete(dir: explodedDistDir) ant.delete(dir: explodedDistDir)
} }
task wrapper(type: Wrapper) { task wrapper(type: Wrapper) {
gradleVersion = '0.8' gradleVersion = '0.9-preview-1'
jarPath = 'gradle' jarPath = 'gradle'
} }

Binary file not shown.

View File

@ -1,8 +1,8 @@
#Sun Dec 13 20:16:46 IST 2009 #Fri Apr 02 15:36:16 IDT 2010
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
distributionVersion=0.8 distributionVersion=0.9-preview-1
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
urlRoot=http\://dist.codehaus.org/gradle urlRoot=http\://dist.codehaus.org/gradle
distributionName=gradle distributionName=gradle

12
gradlew vendored
View File

@ -10,6 +10,8 @@
GRADLE_OPTS="$GRADLE_OPTS -Xmx512m" GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
# JAVA_OPTS="$JAVA_OPTS -Xmx512" # JAVA_OPTS="$JAVA_OPTS -Xmx512"
GRADLE_APP_NAME=Gradle
warn ( ) { warn ( ) {
echo "${PROGNAME}: $*" echo "${PROGNAME}: $*"
} }
@ -60,7 +62,7 @@ if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi fi
STARTER_MAIN_CLASS=org.gradle.wrapper.WrapperMain STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
CLASSPATH=`dirname "$0"`/gradle/gradle-wrapper.jar CLASSPATH=`dirname "$0"`/gradle/gradle-wrapper.jar
WRAPPER_PROPERTIES=`dirname "$0"`/gradle/gradle-wrapper.properties WRAPPER_PROPERTIES=`dirname "$0"`/gradle/gradle-wrapper.properties
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@ -83,10 +85,15 @@ if [ -z "$JAVA_HOME" ] ; then
warn "JAVA_HOME environment variable is not set" warn "JAVA_HOME environment variable is not set"
fi 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 # For Cygwin, switch paths to Windows format before running java
if $cygwin ; then if $cygwin ; then
JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"` JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
TOOLS_JAR=`cygpath --path --mixed "$TOOLS_JAR"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath # We build the pattern for arguments to be converted via cygpath
@ -130,7 +137,6 @@ fi
"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \ "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
-Dtools.jar="$TOOLS_JAR" \
-Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \ -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
$STARTER_MAIN_CLASS \ $STARTER_MAIN_CLASS \
"$@" "$@"

5
gradlew.bat vendored
View File

@ -100,13 +100,12 @@ set CMD_LINE_ARGS=%$
:execute :execute
@rem Setup the command line @rem Setup the command line
set STARTER_MAIN_CLASS=org.gradle.wrapper.WrapperMain set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
set CLASSPATH=%DIRNAME%\gradle\gradle-wrapper.jar set CLASSPATH=%DIRNAME%\gradle\gradle-wrapper.jar
set WRAPPER_PROPERTIES=%DIRNAME%\gradle\gradle-wrapper.properties set WRAPPER_PROPERTIES=%DIRNAME%\gradle\gradle-wrapper.properties
set JAVA_EXE=%JAVA_HOME%\bin\java.exe 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%" 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% "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%

View File

@ -1,6 +1,6 @@
dependsOn(':elasticsearch') dependsOn(':elasticsearch')
usePlugin 'java' apply plugin: 'java'
archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName" archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName"
@ -20,7 +20,7 @@ dependencies {
test { test {
useTestNG() useTestNG()
options.suiteName = project.name suiteName = project.name
options.listeners = ["org.elasticsearch.util.testng.Listeners"] listeners = ["org.elasticsearch.util.testng.Listeners"]
options.systemProperties = ["es.test.log.conf": System.getProperty("es.test.log.conf", "log4j-gradle.properties")] systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
} }

View File

@ -1,7 +1,7 @@
dependsOn(':test-testng') dependsOn(':test-testng')
usePlugin 'java' apply plugin: 'java'
usePlugin 'maven' apply plugin: 'maven'
archivesBaseName = "$project.archivesBaseName" archivesBaseName = "$project.archivesBaseName"
@ -63,9 +63,9 @@ dependencies {
test { test {
useTestNG() useTestNG()
jmvArgs = ["-ea", "-Xmx1024m"] jmvArgs = ["-ea", "-Xmx1024m"]
options.suiteName = project.name suiteName = project.name
options.listeners = ["org.elasticsearch.util.testng.Listeners"] listeners = ["org.elasticsearch.util.testng.Listeners"]
options.systemProperties = ["es.test.log.conf": System.getProperty("es.test.log.conf", "log4j-gradle.properties")] systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
} }
configure(install.repositories.mavenInstaller) { configure(install.repositories.mavenInstaller) {

View File

@ -1,6 +1,6 @@
dependsOn(':elasticsearch') dependsOn(':elasticsearch')
usePlugin 'java' apply plugin: 'java'
archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName" archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName"
@ -22,10 +22,8 @@ dependencies {
test { test {
useTestNG() useTestNG()
jmvArgs = ["-ea", "-Xmx1024m"] jmvArgs = ["-ea", "-Xmx1024m"]
options.suiteName = project.name suiteName = project.name
options.listeners = ["org.elasticsearch.util.testng.Listeners"] listeners = ["org.elasticsearch.util.testng.Listeners"]
options.systemProperties = [ systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
"es.test.log.conf": System.getProperty("es.test.log.conf", "log4j-gradle.properties"), systemProperties["java.net.preferIPv4Stack"] = "true"
"java.net.preferIPv4Stack": "true"
]
} }

View File

@ -1,4 +1,4 @@
usePlugin 'java' apply plugin: 'java'
archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName" archivesBaseName = "$rootProject.archivesBaseName-$project.archivesBaseName"
@ -18,5 +18,5 @@ dependencies {
test { test {
useTestNG() useTestNG()
options.systemProperties = ["es.test.log.conf": "log4j-gradle.properties"] systemProperties['es.test.log.conf'] = 'log4j-gradle.properties'
} }

View File

@ -1,6 +1,6 @@
dependsOn(':elasticsearch') dependsOn(':elasticsearch')
usePlugin 'java' apply plugin: 'java'
archivesBaseName = "elasticsearch-attachments" archivesBaseName = "elasticsearch-attachments"
@ -43,11 +43,9 @@ dependencies {
test { test {
useTestNG() useTestNG()
jmvArgs = ["-ea", "-Xmx1024m"] jmvArgs = ["-ea", "-Xmx1024m"]
options.suiteName = project.name suiteName = project.name
options.listeners = ["org.elasticsearch.util.testng.Listeners"] listeners = ["org.elasticsearch.util.testng.Listeners"]
options.systemProperties = [ systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
"es.test.log.conf": System.getProperty("es.test.log.conf", "log4j-gradle.properties")
]
} }
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << { task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
@ -67,17 +65,8 @@ task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') <
} }
} }
task zip(type: Zip) { task zip(type: Zip, dependsOn: ['explodedDist']) {
dependsOn explodedDist from(explodedDistDir) {
// classifier = 'all'
}
zip.doFirst {task ->
zipRootFolder = "" // its the plugin, don't create it under a specific name
task.configure {
zipFileSet(dir: explodedDistDir, prefix: zipRootFolder) {
// just copy over everything
}
} }
} }