hibernate-orm/hibernate-entitymanager/hibernate-entitymanager.gradle

46 lines
1.3 KiB
Groovy
Raw Normal View History

import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'java'
dependencies {
shrinkwrapVersion = '1.0.0-alpha-6'
compile( project(':hibernate-core') )
compile( libraries.dom4j )
compile( libraries.commons_annotations )
compile( libraries.jpa )
compile( libraries.jta )
compile( libraries.javassist )
testCompile( project(':hibernate-core').sourceSets.test.classes )
testCompile( libraries.junit )
testCompile( libraries.jpa_modelgen )
testCompile( libraries.shrinkwrap_api )
testCompile( libraries.shrinkwrap )
testCompile( libraries.validation )
testRuntime( libraries.validator )
}
bundlesTargetDirName = "$buildDirName/bundles"
bundlesTargetDir = dir( bundlesTargetDirName )
task copyBundleResources (type: Copy) {
from file('src/test/bundles')
into bundlesTargetDir.dir
filter(ReplaceTokens, tokens: [
buildDirName: buildDir.absolutePath,
'db.dialect': 'org.hibernate.dialect.H2Dialect',
'jdbc.driver': 'org.h2.Driver',
'jdbc.user': 'sa',
'jdbc.pass': '',
'jdbc.url': 'jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE',
])
}
copyBundleResources.dependsOn bundlesTargetDir
// make sure that the bundles for the packaged test (PackagingTestCase) are copied as well
processTestResources.dependsOn copyBundleResources