Skip to content

Commit

Permalink
HHH-7067 fix idea config issue and format
Browse files Browse the repository at this point in the history
  • Loading branch information
stliu committed Feb 17, 2012
1 parent ad4b4fc commit 4843d35
Showing 1 changed file with 53 additions and 55 deletions.
108 changes: 53 additions & 55 deletions build.gradle
Expand Up @@ -23,25 +23,25 @@ buildscript {
} }


idea { idea {
project { project {
jdkName = "1.6" jdkName = "1.6"
ipr { ipr {
withXml { provider -> withXml { provider ->
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git' provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
def maxHeapSizeConfig = provider.node.component.find { it.@name == 'JavacSettings' } def maxHeapSizeConfig = provider.node.component.find { it.@name == 'JavacSettings' }
if( maxHeapSizeConfig == null ){ if( maxHeapSizeConfig == null ){
def javacSettingsNode = provider.node.appendNode('component',[name: 'JavacSettings']) def javacSettingsNode = provider.node.appendNode('component',[name: 'JavacSettings'])
javacSettingsNode.appendNode('option', [name:"MAXIMUM_HEAP_SIZE", value:"512"]) javacSettingsNode.appendNode('option', [name:"MAXIMUM_HEAP_SIZE", value:"512"])
} }
} }
beforeMerged { project -> beforeMerged { project ->
project.modulePaths.clear() project.modulePaths.clear()
} }
} }
} }
module { module {
name = "hibernate-orm" name = "hibernate-orm"
} }
} }


// build a map of the dependency artifacts to use. Allows centralized definition of the version of artifacts to // build a map of the dependency artifacts to use. Allows centralized definition of the version of artifacts to
Expand Down Expand Up @@ -107,7 +107,7 @@ libraries = [


subprojects { subProject -> subprojects { subProject ->
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'eclipse' apply plugin: 'eclipse'


defaultTasks 'build' defaultTasks 'build'


Expand Down Expand Up @@ -142,7 +142,7 @@ subprojects { subProject ->


// appropriately inject the common dependencies into each sub-project // appropriately inject the common dependencies into each sub-project
dependencies { dependencies {
compile( libraries.logging ) compile( libraries.logging )
testCompile( libraries.junit ) testCompile( libraries.junit )
testRuntime( libraries.slf4j_api ) testRuntime( libraries.slf4j_api )
testRuntime( libraries.slf4j_log4j12 ) testRuntime( libraries.slf4j_log4j12 )
Expand Down Expand Up @@ -195,9 +195,9 @@ subprojects { subProject ->
// for the time being eat the annoying output from running the annotation processors // for the time being eat the annoying output from running the annotation processors
generateMainLoggingClasses.logging.captureStandardError(LogLevel.INFO) generateMainLoggingClasses.logging.captureStandardError(LogLevel.INFO)


compileJava.dependsOn generateMainLoggingClasses compileJava.dependsOn generateMainLoggingClasses
compileJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"]) compileJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"])
compileTestJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"]) compileTestJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"])


manifest.mainAttributes( manifest.mainAttributes(
provider: 'gradle', provider: 'gradle',
Expand Down Expand Up @@ -228,38 +228,36 @@ subprojects { subProject ->
targetCompatibility = "1.6" targetCompatibility = "1.6"
sourceCompatibility = "1.6" sourceCompatibility = "1.6"


idea { idea {
module { module {
iml { iml {
beforeMerged { module -> beforeMerged { module ->
module.dependencies.clear() module.dependencies.clear()
module.excludeFolders.clear() module.excludeFolders.clear()
} }
whenMerged { module -> whenMerged { module ->
module.dependencies*.exported = true module.dependencies*.exported = true
module.excludeFolders = [ module.excludeFolders += module.pathFactory.path(file(".gradle"))
file(".gradle"), module.excludeFolders += module.pathFactory.path(file("$buildDir/bundles"))
file("$buildDir/bundles"), module.excludeFolders += module.pathFactory.path(file("$buildDir/classes"))
file("$buildDir/classes"), module.excludeFolders += module.pathFactory.path(file("$buildDir/dependency-cache"))
file("$buildDir/dependency-cache"), module.excludeFolders += module.pathFactory.path(file("$buildDir/libs"))
file("$buildDir/libs"), module.excludeFolders += module.pathFactory.path(file("$buildDir/reports"))
file("$buildDir/reports"), module.excludeFolders += module.pathFactory.path(file("$buildDir/test-results"))
file("$buildDir/test-results"), module.excludeFolders += module.pathFactory.path(file("$buildDir/tmp"))
file("$buildDir/tmp"), module.excludeFolders += module.pathFactory.path(file("$buildDir/matrix"))
file("$buildDir/matrix") }
] as Set }
} downloadSources = true
} scopes.COMPILE.plus += configurations.provided
downloadSources = true }
scopes.COMPILE.plus += configurations.provided }
}
} eclipse {

classpath {
eclipse { plusConfigurations.add( configurations.provided )
classpath { }
plusConfigurations.add( configurations.provided ) }
}
}


// elements used to customize the generated POM used during upload // elements used to customize the generated POM used during upload
def pomConfig = { def pomConfig = {
Expand Down

0 comments on commit 4843d35

Please sign in to comment.