HHH-8733 - General build cleanup
This commit is contained in:
parent
f9aa122b5e
commit
ffecce514e
17
build.gradle
17
build.gradle
|
@ -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",
|
||||||
|
|
|
@ -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"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue