HHH-8733 - General build cleanup

This commit is contained in:
Steve Ebersole 2013-11-22 21:20:27 -06:00
parent f9aa122b5e
commit ffecce514e
3 changed files with 21 additions and 8 deletions

View File

@ -173,22 +173,27 @@ subprojects { subProject ->
ext.aptGeneratedSourceDir = file( "${buildDir}/generated-src/apt/${name}" ) ext.aptGeneratedSourceDir = file( "${buildDir}/generated-src/apt/${name}" )
} }
ext.standardJavacOptions = [
"-nowarn",
"-encoding", "UTF-8",
"-source", rootProject.javaLanguageLevel,
"-target", rootProject.javaLanguageLevel
]
tasks.withType( JavaCompile.class ).all { task-> tasks.withType( JavaCompile.class ).all { task->
task.options.define( task.options.define(
compilerArgs: [ compilerArgs: standardJavacOptions
"-nowarn",
"-encoding", "UTF-8",
"-source", rootProject.javaLanguageLevel,
"-target", rootProject.javaLanguageLevel,
]
) )
} }
ext.jbossLoggingToolClass = "org.jboss.logging.processor.apt.LoggingToolsProcessor"
// alter the compileJava (src/main/java javac task) to add JBoss Logging AP hooks // alter the compileJava (src/main/java javac task) to add JBoss Logging AP hooks
compileJava { compileJava {
classpath += configurations.jbossLoggingTool classpath += configurations.jbossLoggingTool
options.compilerArgs += [ options.compilerArgs += [
"-processor", jbossLoggingToolClass,
"-s", "$sourceSets.main.aptGeneratedSourceDir.absolutePath", "-s", "$sourceSets.main.aptGeneratedSourceDir.absolutePath",
"-Adebug=true", "-Adebug=true",
"-AskipTranslations=true", "-AskipTranslations=true",

View File

@ -74,6 +74,7 @@ compileTestJava {
classpath += configurations.hibernateJpaModelGenTool classpath += configurations.hibernateJpaModelGenTool
options.compilerArgs += [ options.compilerArgs += [
"-processor", "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor",
"-s", "$sourceSets.test.aptGeneratedSourceDir.absolutePath" "-s", "$sourceSets.test.aptGeneratedSourceDir.absolutePath"
] ]

View File

@ -32,8 +32,10 @@ def pomDescription() {
sourceSets { sourceSets {
test { test {
ext.enversDemoJavaDir = file( "src/demo/java" ) ext {
ext.enversDemoResourcesDir = file( "src/demo/resources" ) enversDemoJavaDir = file( "src/demo/java" )
enversDemoResourcesDir = file( "src/demo/resources" )
}
java { java {
srcDir enversDemoJavaDir srcDir enversDemoJavaDir
} }
@ -45,6 +47,11 @@ sourceSets {
compileJava { compileJava {
classpath += configurations.hibernateJpaModelGenTool classpath += configurations.hibernateJpaModelGenTool
options.compilerArgs += [
"-processor", "$jbossLoggingToolClass,org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor"
]
} }
jar { jar {