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 )
|
|
|
|
compile( libraries.jpa )
|
|
|
|
antlr( libraries.antlr )
|
|
|
|
provided( libraries.javassist )
|
|
|
|
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'
|
|
|
|
)
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
test {
|
|
|
|
// resources inherently exclude sources
|
|
|
|
resources {
|
|
|
|
setSrcDirs( ['src/test/java','src/test/resources'] )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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-02-10 10:45:28 -05:00
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// This entire section below is all about creating, installing and uploading the hibernate-testing artifacts.
|
|
|
|
// This is obviously extremely verbose. Check back once Gradle goes m2 for 1.0 to see about the MavenPublication
|
|
|
|
// approach Adam talked about as a means to make this more succinct and natural.
|
|
|
|
// todo : check back once Gradle goes m2 for 1.0 to see about the MavenPublication approach
|
|
|
|
configurations {
|
|
|
|
testing
|
|
|
|
}
|
|
|
|
|
2011-02-08 15:27:57 -05:00
|
|
|
task testingJar(type: Jar, dependsOn: compileTestJava) {
|
|
|
|
from sourceSets.test.classes
|
2011-02-10 10:45:28 -05:00
|
|
|
includes += "org/hibernate/testing/**"
|
2011-02-08 15:27:57 -05:00
|
|
|
baseName = 'hibernate-testing'
|
|
|
|
}
|
|
|
|
|
|
|
|
task testingSourcesJar(type: Jar, dependsOn: compileTestJava) {
|
2011-01-28 16:49:22 -05:00
|
|
|
from sourceSets.test.allSource
|
2011-02-10 10:45:28 -05:00
|
|
|
includes += "org/hibernate/testing/**"
|
2011-02-08 15:27:57 -05:00
|
|
|
baseName = 'hibernate-testing'
|
|
|
|
classifier = 'sources'
|
2011-01-28 16:49:22 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
2011-02-10 10:45:28 -05:00
|
|
|
testing testingJar, testingSourcesJar
|
|
|
|
}
|
|
|
|
|
|
|
|
// ugh, lots of duplication with uploadArchives
|
|
|
|
uploadTesting {
|
|
|
|
repositories.mavenDeployer {
|
|
|
|
name = 'jbossDeployer'
|
|
|
|
configuration = configurations.deployerJars
|
|
|
|
pom.project basePomConfig
|
|
|
|
pom.artifactId = 'hibernate-testing'
|
|
|
|
repository(id: "jboss-releases-repository", url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
|
|
|
|
snapshotRepository(id: "jboss-snapshots-repository", url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uploadArchives.dependsOn uploadTesting
|
|
|
|
|
|
|
|
task installTesting(type:Upload, dependsOn: [testingJar,testingSourcesJar]) {
|
|
|
|
configuration = configurations.testing
|
|
|
|
repositories.mavenInstaller {
|
|
|
|
name = RepositoryHandler.DEFAULT_MAVEN_INSTALLER_NAME
|
|
|
|
pom.project basePomConfig
|
|
|
|
pom.artifactId = 'hibernate-testing'
|
|
|
|
}
|
2011-01-28 16:49:22 -05:00
|
|
|
}
|
|
|
|
|
2011-02-10 10:45:28 -05:00
|
|
|
install.dependsOn installTesting
|
2011-03-03 12:53:20 -05:00
|
|
|
uploadTesting.dependsOn installTesting
|
|
|
|
|