HHH-7550 - Fix UP-TO-DATE checking for APT-based tasks
This commit is contained in:
parent
63a2f0d7dc
commit
110c3a4b92
|
@ -122,7 +122,6 @@ subprojects { subProject ->
|
||||||
testCompile files( toolsJar )
|
testCompile files( toolsJar )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ext.aptDumpDir = subProject.file( "${buildDir}/tmp/apt" )
|
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
compileClasspath += configurations.provided
|
compileClasspath += configurations.provided
|
||||||
|
@ -135,6 +134,7 @@ subprojects { subProject ->
|
||||||
}
|
}
|
||||||
|
|
||||||
task generateMainLoggingClasses(type: Compile) {
|
task generateMainLoggingClasses(type: Compile) {
|
||||||
|
ext.aptDumpDir = subProject.file( "${buildDir}/tmp/apt/logging" )
|
||||||
classpath = compileJava.classpath + configurations.jbossLoggingTool
|
classpath = compileJava.classpath + configurations.jbossLoggingTool
|
||||||
source = sourceSets.main.originalJavaSrcDirs
|
source = sourceSets.main.originalJavaSrcDirs
|
||||||
destinationDir = aptDumpDir
|
destinationDir = aptDumpDir
|
||||||
|
@ -157,6 +157,9 @@ subprojects { subProject ->
|
||||||
// source = sourceSets.main.originalJavaSrcDirs
|
// source = sourceSets.main.originalJavaSrcDirs
|
||||||
sourceSets.main.generatedLoggingSrcDir.mkdirs()
|
sourceSets.main.generatedLoggingSrcDir.mkdirs()
|
||||||
}
|
}
|
||||||
|
doLast {
|
||||||
|
aptDumpDir.delete()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
|
|
@ -24,7 +24,6 @@ dependencies {
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// JPA model-gen set up
|
// JPA model-gen set up
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
aptDumpDir = file( "${buildDir}/tmp/apt" )
|
|
||||||
|
|
||||||
sourceSets.test {
|
sourceSets.test {
|
||||||
originalJavaSrcDirs = java.srcDirs
|
originalJavaSrcDirs = java.srcDirs
|
||||||
|
@ -32,6 +31,7 @@ sourceSets.test {
|
||||||
java.srcDir generatedJpaMetamodelSrcDir
|
java.srcDir generatedJpaMetamodelSrcDir
|
||||||
}
|
}
|
||||||
task generateTestJpaMetamodelClasses(type: Compile) {
|
task generateTestJpaMetamodelClasses(type: Compile) {
|
||||||
|
ext.aptDumpDir = file( "${buildDir}/tmp/apt/jpamodelgen" )
|
||||||
classpath = compileTestJava.classpath + configurations.hibernateJpaModelGenTool
|
classpath = compileTestJava.classpath + configurations.hibernateJpaModelGenTool
|
||||||
source = sourceSets.test.originalJavaSrcDirs
|
source = sourceSets.test.originalJavaSrcDirs
|
||||||
destinationDir = aptDumpDir
|
destinationDir = aptDumpDir
|
||||||
|
@ -46,6 +46,9 @@ task generateTestJpaMetamodelClasses(type: Compile) {
|
||||||
doFirst {
|
doFirst {
|
||||||
sourceSets.test.generatedJpaMetamodelSrcDir.mkdirs()
|
sourceSets.test.generatedJpaMetamodelSrcDir.mkdirs()
|
||||||
}
|
}
|
||||||
|
doLast {
|
||||||
|
aptDumpDir.delete()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 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
|
||||||
generateTestJpaMetamodelClasses.logging.captureStandardError(LogLevel.INFO)
|
generateTestJpaMetamodelClasses.logging.captureStandardError(LogLevel.INFO)
|
||||||
|
|
Loading…
Reference in New Issue