diff --git a/build.gradle b/build.gradle index 22aa62c4d255..3b580e2bd95a 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 fb219fe5a323..617ce7a0d3fa 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)