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

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Jun 24 14:45:50 EDT 2010


Author: steve.ebersole at jboss.com
Date: 2010-06-24 14:45:49 -0400 (Thu, 24 Jun 2010)
New Revision: 19823

Modified:
   core/branches/gradle2/build.gradle
   core/branches/gradle2/hibernate-annotations/hibernate-annotations.gradle
   core/branches/gradle2/hibernate-core/hibernate-core.gradle
   core/branches/gradle2/hibernate-ehcache/hibernate-ehcache.gradle
   core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle
Log:
split processing of matrix databases and creating of matrix testing objects into separate plugins

Modified: core/branches/gradle2/build.gradle
===================================================================
--- core/branches/gradle2/build.gradle	2010-06-24 18:44:42 UTC (rev 19822)
+++ core/branches/gradle2/build.gradle	2010-06-24 18:45:49 UTC (rev 19823)
@@ -193,17 +193,40 @@
     }
 }
 
+//configurations {
+//    junit
+//    testng
+//    baseTestRuntime
+//    junitTestRuntime {
+//        extendsFrom baseTestRuntime, junit
+//    }
+//    testngTestRuntime {
+//        extendsFrom baseTestRuntime, testng
+//    }
+//}
+//
+//dependencies {
+//    junit( libraries.junit )
+//    testng( libraries.testng )
+//    baseTestRuntime( libraries.slf4j_log4j ) {
+//        transitive = true
+//    }
+//    baseTestRuntime( libraries.jcl_slf4j )
+//    baseTestRuntime( libraries.jcl_api )
+//    baseTestRuntime( libraries.jcl )
+//}
+
 gradle.afterProject { project ->
     // if the sub-project contains integration tests, inject dependencies into those configurations too
-    if ( project.plugins.findPlugin( org.hibernate.gradle.util.IntegrationTestPlugin.class ) ) {
+    if ( project.plugins.findPlugin( org.hibernate.gradle.testing.matrix.MatrixTestingPlugin ) ) {
         project.dependencies {
-            intgTestCompile( libraries.junit )
-            intgTestRuntime( libraries.slf4j_log4j ) {
+            matrixCompile( libraries.junit )
+            matrixRuntime( libraries.slf4j_log4j ) {
                 transitive = true
             }
-            intgTestRuntime( libraries.jcl_slf4j )
-            intgTestRuntime( libraries.jcl_api )
-            intgTestRuntime( libraries.jcl )
+            matrixRuntime( libraries.jcl_slf4j )
+            matrixRuntime( libraries.jcl_api )
+            matrixRuntime( libraries.jcl )
         }
     }
 }

Modified: core/branches/gradle2/hibernate-annotations/hibernate-annotations.gradle
===================================================================
--- core/branches/gradle2/hibernate-annotations/hibernate-annotations.gradle	2010-06-24 18:44:42 UTC (rev 19822)
+++ core/branches/gradle2/hibernate-annotations/hibernate-annotations.gradle	2010-06-24 18:45:49 UTC (rev 19823)
@@ -1,5 +1,5 @@
 apply plugin: 'java'
-apply plugin: org.hibernate.gradle.util.IntegrationTestPlugin
+apply plugin: org.hibernate.gradle.testing.matrix.MatrixTestingPlugin
 
 sourceSets {
 //    intgTest {
@@ -24,10 +24,10 @@
         transitive = true
     }
     testRuntime( libraries.javassist )
-    intgTestCompile( project(':hibernate-core').sourceSets.intgTest.classes )
+    matrixCompile( project(':hibernate-core').sourceSets.matrix.classes )
 }
 
 ideaModule {
-    testSourceDirs.addAll( sourceSets.intgTest.java.srcDirs )
-    testSourceDirs.addAll( sourceSets.intgTest.resources.srcDirs )
+    testSourceDirs.addAll( sourceSets.matrix.java.srcDirs )
+    testSourceDirs.addAll( sourceSets.matrix.resources.srcDirs )
 }
\ 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-24 18:44:42 UTC (rev 19822)
+++ core/branches/gradle2/hibernate-core/hibernate-core.gradle	2010-06-24 18:45:49 UTC (rev 19823)
@@ -1,13 +1,16 @@
 apply plugin: 'java'
 apply plugin: 'antlr'
-apply plugin: org.hibernate.gradle.util.IntegrationTestPlugin
+apply plugin: org.hibernate.gradle.testing.matrix.MatrixTestingPlugin
 
 sourceSets {
-    intgTest {
-        resources{
-            // resources inherently exclude sources
-            srcDir 'src/intgTest/java'
+    matrix {
+        java {
+            setSrcDirs( ['src/intgTest/java'] )
         }
+        // resources inherently exclude sources
+        resources {
+            setSrcDirs( ['src/intgTest/java','src/intgTest/resources'] )
+        }
     }
 }
 
@@ -24,11 +27,16 @@
     }
     provided( libraries.ant )
     provided( libraries.jacc )
-    testRuntime( 'jaxen:jaxen:1.1 at jar' )
+    testRuntime( 'jaxen:jaxen:1.1' )
     testRuntime( libraries.javassist )
     testRuntime( libraries.cglib ) {
         transitive = true
     }
+    matrixRuntime( 'jaxen:jaxen:1.1' )
+    matrixRuntime( libraries.javassist )
+    matrixRuntime( libraries.cglib ) {
+        transitive = true
+    }
 }
 
 
@@ -38,7 +46,7 @@
 
 ideaModule {
     sourceDirs.add( file( buildDirName + '/generated-src/antlr/main' ) )
-    testSourceDirs.addAll( sourceSets.intgTest.java.srcDirs )
-    testSourceDirs.addAll( sourceSets.intgTest.resources.srcDirs )
+    testSourceDirs.addAll( sourceSets.matrix.java.srcDirs )
+    testSourceDirs.addAll( sourceSets.matrix.resources.srcDirs )
 }
 

Modified: core/branches/gradle2/hibernate-ehcache/hibernate-ehcache.gradle
===================================================================
--- core/branches/gradle2/hibernate-ehcache/hibernate-ehcache.gradle	2010-06-24 18:44:42 UTC (rev 19822)
+++ core/branches/gradle2/hibernate-ehcache/hibernate-ehcache.gradle	2010-06-24 18:45:49 UTC (rev 19823)
@@ -1,10 +1,10 @@
 apply plugin: 'java'
-apply plugin: org.hibernate.gradle.util.IntegrationTestPlugin
+apply plugin: org.hibernate.gradle.testing.matrix.MatrixTestingPlugin
 
 // todo : does this single test really need to be run against ever database in the matrix?
 
 dependencies {
     compile( project( ':hibernate-core' ) )
     compile( [group: 'net.sf.ehcache', name: 'ehcache', version: '1.5.0'] )
-    intgTestCompile( project(':hibernate-core').sourceSets.intgTest.classes )
+    matrixCompile( project(':hibernate-core').sourceSets.matrix.classes )
 }
\ No newline at end of file

Modified: core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle
===================================================================
--- core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle	2010-06-24 18:44:42 UTC (rev 19822)
+++ core/branches/gradle2/hibernate-entitymanager/hibernate-entitymanager.gradle	2010-06-24 18:45:49 UTC (rev 19823)
@@ -1,5 +1,5 @@
 apply plugin: 'java'
-apply plugin: org.hibernate.gradle.util.IntegrationTestPlugin
+apply plugin: org.hibernate.gradle.testing.matrix.MatrixTestingPlugin
 
 // todo : there are test failures due to issues with how 'bundles' are handled.
 //      My guess is using TCCL as the tests try to is not valid in Gradle.
@@ -20,40 +20,39 @@
     compile( libraries.jpa )
     compile( libraries.jta )
     compile( libraries.javassist )
-    intgTestCompile( project(':hibernate-core').sourceSets.intgTest.classes )
-    intgTestCompile( libraries.junit )
-    intgTestCompile( libraries.jpa_modelgen )
-    intgTestCompile( libraries.shrinkwrap_api )
-    intgTestCompile( libraries.shrinkwrap )
-    intgTestCompile( libraries.validation )
-    intgTestCompile( libraries.slf4j_api )
-    intgTestRuntime( libraries.validator )
+    matrixCompile( project(':hibernate-core').sourceSets.matrix.classes )
+    matrixCompile( libraries.junit )
+    matrixCompile( libraries.jpa_modelgen )
+    matrixCompile( libraries.shrinkwrap_api )
+    matrixCompile( libraries.shrinkwrap )
+    matrixCompile( libraries.validation )
+    matrixCompile( libraries.slf4j_api )
+    matrixRuntime( libraries.validator )
 }
 
 procTargetDirName = buildDirName + "/generated-src/jpamodelgen"
 procTargetDir = dir( procTargetDirName )
-compileIntgTestJava {
+compileMatrixJava {
     configure( options ) {
         fork( executable: java6Home.getJavacExecutable() )
         compilerArgs = [ "-s", "$procTargetDir.dir.absolutePath" ]
     }
 }
-compileIntgTestJava.dependsOn procTargetDir
-sourceSets.intgTest.java.srcDir procTargetDirName
+compileMatrixJava.dependsOn procTargetDir
+//sourceSets.intgTest.java.srcDir procTargetDirName
 
 
 bundlesTargetDirName = "$buildDirName/bundles"
 bundlesTargetDir = dir( bundlesTargetDirName )
-task processIntgTestBundles {
+task processBundleResources {
     copy {
         from 'src/intgTest/bundles'
         into bundlesTargetDir.dir
     }
 }
-processIntgTestBundles.dependsOn bundlesTargetDir
+processBundleResources.dependsOn bundlesTargetDir
+processMatrixResources.dependsOn processBundleResources
 
-processIntgTestResources.dependsOn processIntgTestBundles
-
 ideaModule {
     testSourceDirs.add( file( procTargetDirName ) )
 }



More information about the hibernate-commits mailing list