[hibernate-commits] Hibernate SVN: r19690 - in core/branches/gradle2: gradle and 3 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Jun 3 13:07:14 EDT 2010


Author: steve.ebersole at jboss.com
Date: 2010-06-03 13:07:12 -0400 (Thu, 03 Jun 2010)
New Revision: 19690

Added:
   core/branches/gradle2/gradle/
   core/branches/gradle2/gradle/gradle-wrapper.jar
   core/branches/gradle2/gradle/gradle-wrapper.properties
   core/branches/gradle2/gradlew
   core/branches/gradle2/gradlew.bat
Modified:
   core/branches/gradle2/build.gradle
   core/branches/gradle2/hibernate-core/hibernate-core.gradle
   core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle
   core/branches/gradle2/hibernate-infinispan/hibernate-infinispan.gradle
   core/branches/gradle2/settings.gradle
Log:
gardlew & initial jdk home handling

Modified: core/branches/gradle2/build.gradle
===================================================================
--- core/branches/gradle2/build.gradle	2010-06-03 13:28:28 UTC (rev 19689)
+++ core/branches/gradle2/build.gradle	2010-06-03 17:07:12 UTC (rev 19690)
@@ -3,14 +3,18 @@
         mavenRepo urls: 'http://gradle.artifactoryonline.com/gradle/plugins'
     }
     dependencies {
-        classpath "org.gradle.plugins:gradle-idea-plugin:0.2"
+        classpath "org.gradle.plugins:gradle-idea-plugin:0.3"
     }
 }
- 
+
 allprojects {
     apply plugin: 'org.gradle.idea'
 }
 
+ideaProject {
+    javaVersion = "1.5"
+}
+
 subprojects {
     apply plugin: 'java'
 
@@ -33,6 +37,11 @@
         }
     }
 
+    ideaModule {
+        downloadJavadoc = false
+        scopes.COMPILE.plus.add(configurations.provided)
+    }
+
     dependencies {
         slf4jVersion = '1.5.8'
         dom4jVersion = '1.6.1'
@@ -84,66 +93,73 @@
     targetCompatibility = "1.5"
     sourceCompatibility = "1.5"
 
-    ideaModule {
-        downloadJavadoc = false
-        scopes.COMPILE.plus.add(configurations.provided)
+    compileJava {
+        if (hasProperty('jdk15_home')) { options.fork(executable: "$jdk15_home/bin/javac") }
     }
+
+    compileTestJava {
+        if (hasProperty('jdk15_home')) { options.fork(executable: "$jdk15_home/bin/javac") }
+    }
+
+    test {
+        ignoreFailures = true
+    }
 }
 
 dependsOnChildren()
 
 
-documentationBuildDir = dir( buildDirName + "/documentation" );
+documentationBuildDir = dir(buildDirName + "/documentation");
 
 task documentation(dependsOn: documentationBuildDir) << {
 }
 
-distBuildDir = dir( buildDirName + "/dist" );
+distBuildDir = dir(buildDirName + "/dist");
 
 task uberJar(type: Jar, dependsOn: distBuildDir) {
     destinationDir = distBuildDir.dir
     customName = 'hibernate3.jar'
-    from( allCompilationOutputDirectories() )
+    from(allCompilationOutputDirectories())
 }
 
 subprojects.each { Project project ->
-    if ( project.name != 'hibernate-testing' ) {
-        uberJar.dependsOn project.getTasksByName( "classes", false );
+    if (project.name != 'hibernate-testing') {
+        uberJar.dependsOn project.getTasksByName("classes", false);
     }
 }
 
 task prepareDistribution(dependsOn: [uberJar, documentation]) << {
-    File requiredLibDir = new File( distBuildDir.dir, "stage/lib/required" );
+    File requiredLibDir = new File(distBuildDir.dir, "stage/lib/required");
     copy {
-        from project('core').getConfigurations().getByName( 'runtime' )
+        from project('core').getConfigurations().getByName('runtime')
         into requiredLibDir
     }
     copy {
-        from project('core').getConfigurations().getByName( 'provided' ).files{ dep -> dep.name == 'jboss-transaction-api' }
+        from project('core').getConfigurations().getByName('provided').files { dep -> dep.name == 'jboss-transaction-api' }
         into requiredLibDir
         rename 'jboss-transaction-api(.*).jar', 'jta-1.1.jar'
     }
 
-    File cglibLibDir = new File( distBuildDir.dir, "stage/lib/bytecode/cglib" );
+    File cglibLibDir = new File(distBuildDir.dir, "stage/lib/bytecode/cglib");
     copy {
-        from project('core').getConfigurations().getByName( 'provided' ).files{ dep -> dep.name == 'cglib' }
+        from project('core').getConfigurations().getByName('provided').files { dep -> dep.name == 'cglib' }
         into cglibLibDir
     }
 
-    File javassistLibDir = new File( distBuildDir.dir, "stage/lib/bytecode/javassist" );
+    File javassistLibDir = new File(distBuildDir.dir, "stage/lib/bytecode/javassist");
     copy {
-        from project('core').getConfigurations().getByName( 'provided' ).files{ dep -> dep.name == 'javassist' }
+        from project('core').getConfigurations().getByName('provided').files { dep -> dep.name == 'javassist' }
         into javassistLibDir
     }
 
 //    ['c3p0', 'proxool', 'ehcache', 'jbosscache', 'infinispan', 'oscache', 'swarmcache'].each { feature ->
     ['connection-c3p0', 'connection-proxool', 'cache-ehcache', 'cache-oscache', 'cache-swarmcache'].each { feature ->
-        File featureLibDir = new File( distBuildDir.dir, "stage/lib/optional/${feature}" );
+        File featureLibDir = new File(distBuildDir.dir, "stage/lib/optional/${feature}");
 //        Set libs = project("hibernate-${feature}").configurations.runtime.files - project("hibernate-core").configurations.runtime.files
         Set libs = project("${feature}").configurations.runtime.files
-                - files(requiredLibDir)
-                - files( cglibLibDir )
-                - files( javassistLibDir )
+        -files(requiredLibDir)
+        -files(cglibLibDir)
+        -files(javassistLibDir)
         copy {
             from libs
             into featureLibDir
@@ -202,11 +218,11 @@
 
 FileCollection[] allCompilationOutputDirectories() {
     ArrayList<File> compilationOutputDirectories = new ArrayList<File>();
-    for ( Project project : getSubprojects() ) {
-        if ( project.name == 'hibernate-testing' ) {
+    for (Project project: getSubprojects()) {
+        if (project.name == 'hibernate-testing') {
             continue;
         }
-        compilationOutputDirectories.add( project.sourceSets.main.classes.asFileTree );
+        compilationOutputDirectories.add(project.sourceSets.main.classes.asFileTree);
     }
     return compilationOutputDirectories as FileCollection[];
 }
@@ -223,3 +239,8 @@
 task distribution(dependsOn: [distributionZip, distributionTgz]) << {
 //    println 'building dists (todo)...'
 }
+
+task wrapper(type: Wrapper) {
+    gradleVersion = '0.9-preview-3'
+    jarPath = 'gradle'
+}

Added: core/branches/gradle2/gradle/gradle-wrapper.jar
===================================================================
(Binary files differ)


Property changes on: core/branches/gradle2/gradle/gradle-wrapper.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: core/branches/gradle2/gradle/gradle-wrapper.properties
===================================================================
--- core/branches/gradle2/gradle/gradle-wrapper.properties	                        (rev 0)
+++ core/branches/gradle2/gradle/gradle-wrapper.properties	2010-06-03 17:07:12 UTC (rev 19690)
@@ -0,0 +1,9 @@
+#Thu Jun 03 09:28:56 CDT 2010
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+distributionVersion=0.9-preview-3
+zipStorePath=wrapper/dists
+urlRoot=http\://dist.codehaus.org/gradle
+distributionName=gradle
+distributionClassifier=bin

Added: core/branches/gradle2/gradlew
===================================================================
--- core/branches/gradle2/gradlew	                        (rev 0)
+++ core/branches/gradle2/gradlew	2010-06-03 17:07:12 UTC (rev 19690)
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+##############################################################################
+##                                                                          ##
+##  Gradle wrapper script for UN*X                                         ##
+##                                                                          ##
+##############################################################################
+
+# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
+# GRADLE_OPTS="$GRADLE_OPTS -Xmx512"
+# JAVA_OPTS="$JAVA_OPTS -Xmx512"
+
+GRADLE_APP_NAME=Gradle
+
+warn ( ) {
+    echo "${PROGNAME}: $*"
+}
+
+die ( ) {
+    warn "$*"
+    exit 1
+}
+
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set JAVA_HOME if it's not already set.
+if [ -z "$JAVA_HOME" ] ; then
+    if $darwin ; then
+        [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
+        [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
+    else
+        javaExecutable="`which javac`"
+        [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
+        # readlink(1) is not available as standard on Solaris 10.
+        readLink=`which readlink`
+        [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+        export JAVA_HOME="$javaHome"
+    fi
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+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.
+if [ -z "$JAVACMD" ] ; then
+    if [ -n "$JAVA_HOME" ] ; then
+        if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+            # IBM's JDK on AIX uses strange locations for the executables
+            JAVACMD="$JAVA_HOME/jre/sh/java"
+        else
+            JAVACMD="$JAVA_HOME/bin/java"
+        fi
+    else
+        JAVACMD="java"
+    fi
+fi
+if [ ! -x "$JAVACMD" ] ; then
+    die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
+fi
+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"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done 
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
+        -classpath "$CLASSPATH" \
+        -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
+        $STARTER_MAIN_CLASS \
+        "$@"


Property changes on: core/branches/gradle2/gradlew
___________________________________________________________________
Name: svn:executable
   + *

Added: core/branches/gradle2/gradlew.bat
===================================================================
--- core/branches/gradle2/gradlew.bat	                        (rev 0)
+++ core/branches/gradle2/gradlew.bat	2010-06-03 17:07:12 UTC (rev 19690)
@@ -0,0 +1,126 @@
+ at if "%DEBUG%" == "" @echo off
+ at rem ##########################################################################
+ at rem                                                                         ##
+ at rem  Gradle startup script for Windows                                      ##
+ at rem                                                                         ##
+ at rem ##########################################################################
+
+ at rem
+ at rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
+ at rem
+
+ at rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+ at rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
+ at rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512
+ at rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.\
+
+ at 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"
+
+ at 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
+ at 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
+ at 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
+ at rem get name of script to launch with full path
+ at rem Get command-line arguments, handling Windowz variants
+SET _marker=%JAVA_HOME: =%
+ at 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
+ at 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
+ at rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+ at 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
+ at 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
\ No newline at end of file

Modified: core/branches/gradle2/hibernate-core/hibernate-core.gradle
===================================================================
--- core/branches/gradle2/hibernate-core/hibernate-core.gradle	2010-06-03 13:28:28 UTC (rev 19689)
+++ core/branches/gradle2/hibernate-core/hibernate-core.gradle	2010-06-03 17:07:12 UTC (rev 19690)
@@ -4,12 +4,12 @@
 dependencies {
     antVersion = '1.6.5'
 
-    compile (
+    compile(
             [group: 'commons-collections', name: 'commons-collections', version: '3.1'],
             [group: 'dom4j', name: 'dom4j', version: dom4jVersion, transitive: false],
             "javax.transaction:jta:1.1"
     )
-    antlr (
+    antlr(
             [group: 'antlr', name: 'antlr', version: antlrVersion]
     )
     provided(
@@ -21,5 +21,9 @@
 }
 
 manifest.mainAttributes(
-    'Main-Class': 'org.hibernate.Version'
+        'Main-Class': 'org.hibernate.Version'
 )
+
+ideaModule {
+    sourceDirs.add(file('target/generated-src'))
+}

Modified: core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle
===================================================================
--- core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle	2010-06-03 13:28:28 UTC (rev 19689)
+++ core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle	2010-06-03 17:07:12 UTC (rev 19690)
@@ -27,7 +27,7 @@
 processTestResources.doLast(
         {
             copy {
-                from( sourceSets.test.java.srcDirs ) {
+                from(sourceSets.test.java.srcDirs) {
                     include '**/*.properties'
                     include '**/*.xml'
                 }
@@ -36,23 +36,32 @@
         }
 )
 
-procTargetDir = dir( buildDirName + "/generated-src/jpamodelgen" )
+procTargetDir = dir(buildDirName + "/generated-src/jpamodelgen")
 
-task generateTestStaticMetamodelClasses(dependsOn: procTargetDir) << {
-    ant.javac(
-            srcdir: file( 'src/test/java' ),
-            destdir: procTargetDir.dir,
-            failonerror: false,
-            fork: true,
-            executable: '/opt/java/jdk-1.6/bin/javac',
-            target: '1.5'
-    ) {
-        compilerArg( value: "-proc:only" )
-        sourceSets.test.runtimeClasspath.addToAntBuilder( ant, 'classpath' )
+if (hasProperty('jdk16_home')) {
+    task generateTestStaticMetamodelClasses(dependsOn: procTargetDir) << {
+        ant.javac(
+                srcdir: file('src/test/java'),
+                destdir: procTargetDir.dir,
+                failonerror: false,
+                fork: true,
+                executable: "$jdk16_home/bin/javac",
+                target: '1.5'
+        ) {
+            compilerArg(value: "-proc:only")
+            sourceSets.test.runtimeClasspath.addToAntBuilder(ant, 'classpath')
+        }
+
+        sourceSets.test.java.srcDir(procTargetDir.dir);
     }
 
-    sourceSets.test.java.srcDir( procTargetDir.dir );
+    compileTestJava.dependsOn generateTestStaticMetamodelClasses
+} else {
+    test.enabled = false
+    compileTestJava.enabled = false
 }
 
-compileTestJava.dependsOn generateTestStaticMetamodelClasses
+ideaModule {
+    testSourceDirs.add(file('target/generated-src/jpamodelgen'))
+}
 

Modified: core/branches/gradle2/hibernate-infinispan/hibernate-infinispan.gradle
===================================================================
--- core/branches/gradle2/hibernate-infinispan/hibernate-infinispan.gradle	2010-06-03 13:28:28 UTC (rev 19689)
+++ core/branches/gradle2/hibernate-infinispan/hibernate-infinispan.gradle	2010-06-03 17:07:12 UTC (rev 19690)
@@ -11,10 +11,10 @@
     rhqVersion = '1.4.0.B01'
     jgroupsVersion = '2.9.0.GA'
 
-    compile (
+    compile(
             project(':hibernate-core')
     )
-    compile (
+    compile(
             [group: 'org.infinispan', name: 'infinispan-core', version: infinispanVersion]
     ) {
         artifact {
@@ -22,7 +22,7 @@
             type = 'jar'
         }
     }
-    testCompile (
+    testCompile(
             project(':hibernate-testing'),
             [group: 'org.jboss', name: 'jboss-common-core', version: jbossCommonCoreVersion],
             [group: 'org.jboss.naming', name: 'jnp-client', version: jnpVersion],
@@ -33,7 +33,7 @@
             "javax.transaction:jta:1.1"
     )
 // ewww...  http://jira.codehaus.org/browse/GRADLE-739
-    testCompile (
+    testCompile(
             [group: 'org.infinispan', name: 'infinispan-core', version: infinispanVersion]
     ) {
         artifact {
@@ -46,7 +46,7 @@
             type = 'jar'
         }
     }
-    testRuntime (
+    testRuntime(
             [group: 'javassist', name: 'javassist', version: javassistVersion],
             [group: 'cglib', name: 'cglib', version: cglibVersion]
     )
@@ -56,13 +56,17 @@
 targetCompatibility = "1.6"
 
 compileJava {
-    options.fork(executable: '/opt/java/jdk-1.6/bin/javac')
+    options.fork(executable: "$jdk16_home/bin/javac")
 }
 
 compileTestJava {
-    options.fork(executable: '/opt/java/jdk-1.6/bin/javac')
+     options.fork(executable: "$jdk16_home/bin/javac")
 }
 
 test {
-    jvm: '/opt/java/jdk-1.6/bin/java'
+     jvm: "$jdk16_home/bin/java"
+}
+
+ideaModule {
+    javaVersion = "1.6"
 }
\ No newline at end of file

Modified: core/branches/gradle2/settings.gradle
===================================================================
--- core/branches/gradle2/settings.gradle	2010-06-03 13:28:28 UTC (rev 19689)
+++ core/branches/gradle2/settings.gradle	2010-06-03 17:07:12 UTC (rev 19690)
@@ -1,3 +1,12 @@
+Properties properties = new Properties()
+properties.load(new FileInputStream(new File(gradle.gradleUserHomeDir, 'gradle.properties')))
+
+if (properties.jdk16_home) {
+    include 'hibernate-infinispan'
+}
+
+include 'hibernate-entitymanager'
+include 'hibernate-envers'
 include 'hibernate-core'
 include 'hibernate-testing'         // todo : merge this and testsuite into hibernate-core
 include 'hibernate-jmx'             // todo : merge into hibernate-core
@@ -2,8 +11,5 @@
 include 'hibernate-annotations'     // todo : merge into hibernate-core
-include 'hibernate-entitymanager'
-include 'hibernate-envers'
 include 'hibernate-c3p0'
 include 'hibernate-proxool'
 include 'hibernate-ehcache'
-include 'hibernate-infinispan'
 include 'hibernate-jbosscache'
@@ -19,4 +25,4 @@
     project.buildFileName = "${project.name}.gradle"
     assert project.projectDir.isDirectory()
     assert project.buildFile.isFile()
-}
\ No newline at end of file
+}



More information about the hibernate-commits mailing list