From 110c3a4b92b669ac439d0b4266f06b1043dcaccf Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 24 Aug 2012 20:39:22 -0500 Subject: [PATCH] HHH-7550 - Fix UP-TO-DATE checking for APT-based tasks --- build.gradle | 5 ++++- hibernate-entitymanager/hibernate-entitymanager.gradle | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 22aa62c4d2..3b580e2bd9 100644 --- a/build.gradle +++ b/build.gradle @@ -122,7 +122,6 @@ subprojects { subProject -> testCompile files( toolsJar ) } } - ext.aptDumpDir = subProject.file( "${buildDir}/tmp/apt" ) sourceSets.main { compileClasspath += configurations.provided @@ -135,6 +134,7 @@ subprojects { subProject -> } task generateMainLoggingClasses(type: Compile) { + ext.aptDumpDir = subProject.file( "${buildDir}/tmp/apt/logging" ) classpath = compileJava.classpath + configurations.jbossLoggingTool source = sourceSets.main.originalJavaSrcDirs destinationDir = aptDumpDir @@ -157,6 +157,9 @@ subprojects { subProject -> // source = sourceSets.main.originalJavaSrcDirs sourceSets.main.generatedLoggingSrcDir.mkdirs() } + doLast { + aptDumpDir.delete() + } } // for the time being eat the annoying output from running the annotation processors diff --git a/hibernate-entitymanager/hibernate-entitymanager.gradle b/hibernate-entitymanager/hibernate-entitymanager.gradle index fb219fe5a3..617ce7a0d3 100644 --- a/hibernate-entitymanager/hibernate-entitymanager.gradle +++ b/hibernate-entitymanager/hibernate-entitymanager.gradle @@ -24,7 +24,6 @@ dependencies { //////////////////////////////////////////////////////////////////////////////////////////////////////// // JPA model-gen set up //////////////////////////////////////////////////////////////////////////////////////////////////////// -aptDumpDir = file( "${buildDir}/tmp/apt" ) sourceSets.test { originalJavaSrcDirs = java.srcDirs @@ -32,6 +31,7 @@ sourceSets.test { java.srcDir generatedJpaMetamodelSrcDir } task generateTestJpaMetamodelClasses(type: Compile) { + ext.aptDumpDir = file( "${buildDir}/tmp/apt/jpamodelgen" ) classpath = compileTestJava.classpath + configurations.hibernateJpaModelGenTool source = sourceSets.test.originalJavaSrcDirs destinationDir = aptDumpDir @@ -46,6 +46,9 @@ task generateTestJpaMetamodelClasses(type: Compile) { doFirst { sourceSets.test.generatedJpaMetamodelSrcDir.mkdirs() } + doLast { + aptDumpDir.delete() + } } // for the time being eat the annoying output from running the annotation processors generateTestJpaMetamodelClasses.logging.captureStandardError(LogLevel.INFO)