2010-10-08 21:51:41 -04:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'antlr'
|
2011-03-21 21:33:19 -04:00
|
|
|
apply plugin: org.hibernate.build.gradle.inject.InjectionPlugin
|
2010-10-08 21:51:41 -04:00
|
|
|
|
|
|
|
dependencies {
|
2011-02-08 14:55:27 -05:00
|
|
|
compile( libraries.commons_collections )
|
2010-10-08 21:51:41 -04:00
|
|
|
compile( libraries.jta )
|
|
|
|
compile( libraries.dom4j ) {
|
|
|
|
transitive = false
|
|
|
|
}
|
|
|
|
compile( libraries.commons_annotations )
|
2011-03-29 07:58:17 -04:00
|
|
|
compile( libraries.jandex )
|
2010-10-08 21:51:41 -04:00
|
|
|
compile( libraries.jpa )
|
2011-03-29 16:14:09 -04:00
|
|
|
compile( libraries.javassist )
|
2010-10-08 21:51:41 -04:00
|
|
|
antlr( libraries.antlr )
|
|
|
|
provided( libraries.ant )
|
2011-02-25 12:41:52 -05:00
|
|
|
provided( libraries.jacc )
|
2010-10-08 21:51:41 -04:00
|
|
|
provided( libraries.validation )
|
2011-03-07 17:20:53 -05:00
|
|
|
testCompile( project(':hibernate-testing') )
|
2010-10-08 21:51:41 -04:00
|
|
|
testCompile( libraries.validation )
|
|
|
|
testCompile( libraries.validator ) {
|
|
|
|
// for test runtime
|
|
|
|
transitive = true
|
|
|
|
}
|
|
|
|
testRuntime( 'jaxen:jaxen:1.1' )
|
|
|
|
testRuntime( libraries.javassist )
|
|
|
|
}
|
|
|
|
|
|
|
|
manifest.mainAttributes(
|
|
|
|
'Main-Class': 'org.hibernate.Version'
|
|
|
|
)
|
|
|
|
|
2011-04-01 12:02:07 -04:00
|
|
|
|
|
|
|
sourceSets.main {
|
|
|
|
originalJavaSrcDirs = java.srcDirs
|
|
|
|
jaxbTargetDir = file( "${buildDir}/generated-src/jaxb" )
|
|
|
|
java.srcDir jaxbTargetDir
|
|
|
|
}
|
|
|
|
|
|
|
|
// resources inherently exclude sources
|
|
|
|
sourceSets.test.resources {
|
|
|
|
setSrcDirs( ['src/test/java','src/test/resources'] )
|
2010-10-08 21:51:41 -04:00
|
|
|
}
|
|
|
|
|
2010-10-10 16:06:06 -04:00
|
|
|
ideaModule {
|
2010-10-11 08:47:31 -04:00
|
|
|
sourceDirs.add( file( '$buildDir/generated-src/antlr/main' ) )
|
2010-10-10 16:06:06 -04:00
|
|
|
}
|
|
|
|
|
2011-03-29 07:58:17 -04:00
|
|
|
task jaxb << {
|
|
|
|
jaxbTargetDir = file( "${buildDir}/generated-src/jaxb" )
|
|
|
|
jaxbTargetDir.mkdirs()
|
|
|
|
|
|
|
|
ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.jaxb.asPath)
|
|
|
|
ant.jaxbTargetDir = jaxbTargetDir
|
|
|
|
ant.xjc(destdir: '${jaxbTargetDir}', package: 'org.hibernate.metamodel.source.xml') {
|
|
|
|
schema(dir: 'src/main/resources/org/hibernate/ejb', includes: 'orm_2_0.xsd')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileJava.dependsOn jaxb
|
|
|
|
|
|
|
|
|