HHH-5616 - Switch to Gradle for builds .. IntelliJ

This commit is contained in:
Steve Ebersole 2010-10-10 15:06:06 -05:00
parent 901513ed7c
commit 7ce80c9c2d
2 changed files with 20 additions and 14 deletions

View File

@ -12,9 +12,11 @@ allprojects {
ideaProject {
javaVersion = "1.6"
withXml { root ->
root.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
}
}
// build a map of the dependency artifacts to use. Allows centralized definition of the version of artifacts to
// use. In that respect it serves a role similar to <dependencyManagement> in Maven
slf4jVersion = '1.5.8'
@ -69,13 +71,15 @@ libraries = [
subprojects { subProject ->
apply plugin: 'idea'
group = 'org.hibernate'
version = '4.0.0-SNAPSHOT'
defaultTasks 'build'
// minimize changes, at least for now (gradle uses 'build' by default)..
buildDirName = "target"
buildDir = "target"
if ( 'hibernate-release' != subProject.name ) {
apply plugin: 'java'
@ -141,10 +145,12 @@ subprojects { subProject ->
sourceCompatibility = "1.6"
ideaModule {
downloadJavadoc = false
// scopes.COMPILE.plus.add( configurations.provided )
// outputDir = subProject.sourceSets.main.classesDir
// testOutputDir = subProject.sourceSets.test.classesDir
// treat our "provided" configuration dependencies as "Compile" scope dependencies in IntelliJ
scopes.COMPILE.plus.add( configurations.provided )
// Use explicitly separate compilation output directories for Gradle and IntelliJ
File baseDirectory = new File( subProject.buildDir, "idea/classes" )
outputDir = new File( baseDirectory, "main" )
testOutputDir = new File( baseDirectory, "test" )
whenConfigured { module ->
module.dependencies*.exported = true
}
@ -153,7 +159,10 @@ subprojects { subProject ->
// elements used to customize the generated POM used during upload
def pomConfig = {
url 'http://hibernate.org'
organization 'Hibernate.org'
organization {
name 'Hibernate.org'
url 'http://hibernate.org'
}
issueManagement {
system 'jira'
url 'http://opensource.atlassian.com/projects/hibernate/browse/HHH'

View File

@ -44,12 +44,9 @@ sourceSets {
}
}
ideaModule {
sourceDirs.add( file( buildDir + '/generated-src/antlr/main' ) )
}
// http://jira.codehaus.org/browse/GRADLE-1158
test.testReport = false
//ideaModule {
// sourceDirs.add( file( buildDirName + '/generated-src/antlr/main' ) )
// testSourceDirs.addAll( sourceSets.matrix.java.srcDirs )
// testSourceDirs.addAll( sourceSets.matrix.resources.srcDirs )
//}