HHH-6618 enable idea support for matrix sourceset

This commit is contained in:
Strong Liu 2011-08-30 15:20:51 +08:00
parent e941eca2d5
commit 3b7bdb8ddc
2 changed files with 26 additions and 4 deletions

View File

@ -32,7 +32,16 @@ dependencies {
manifest.mainAttributes( manifest.mainAttributes(
'Main-Class': 'org.hibernate.Version' 'Main-Class': 'org.hibernate.Version'
) )
sourceSets {
matrix {
java {
srcDir 'src/matrix/java'
}
resources {
srcDir 'src/matrix/resources'
}
}
}
sourceSets.main { sourceSets.main {
originalJavaSrcDirs = java.srcDirs originalJavaSrcDirs = java.srcDirs
jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" ) jaxbTargetDir = file( "${buildDir}/generated-src/jaxb/main" )
@ -45,7 +54,9 @@ sourceSets.test.resources {
} }
ideaModule { ideaModule {
sourceDirs.add( file( '$buildDir/generated-src/antlr/main' ) ) sourceDirs += file( '$buildDir/generated-src/antlr/main' )
testSourceDirs += file( 'src/matrix/java')
testSourceDirs += file( 'src/matrix/resources')
} }
task jaxb { task jaxb {

View File

@ -1,7 +1,7 @@
import org.apache.tools.ant.filters.ReplaceTokens import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'java' apply plugin: 'java'
apply plugin: org.hibernate.gradle.testing.matrix.MatrixTestingPlugin //apply plugin: org.hibernate.gradle.testing.matrix.MatrixTestingPlugin
dependencies { dependencies {
shrinkwrapVersion = '1.0.0-beta-5' shrinkwrapVersion = '1.0.0-beta-5'
@ -27,9 +27,20 @@ sourceSets.test {
generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" ) generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" )
java.srcDir generatedJpaMetamodelSrcDir java.srcDir generatedJpaMetamodelSrcDir
} }
sourceSets {
matrix {
java {
srcDir 'src/matrix/java'
}
resources {
srcDir 'src/matrix/resources'
}
}
}
ideaModule { ideaModule {
excludeDirs += file("$buildDir/bundles") excludeDirs += file("$buildDir/bundles")
testSourceDirs += file( 'src/matrix/java')
testSourceDirs += file( 'src/matrix/resources')
} }
task generateJpaMetamodelClasses(type: Compile) { task generateJpaMetamodelClasses(type: Compile) {