Skip to content

Commit

Permalink
HHH-7550 - Fix UP-TO-DATE checking for APT-based tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Aug 25, 2012
1 parent 63a2f0d commit 110c3a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion build.gradle
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion hibernate-entitymanager/hibernate-entitymanager.gradle
Expand Up @@ -24,14 +24,14 @@ 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
ext.generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" ) ext.generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" )
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
Expand All @@ -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)
Expand Down

0 comments on commit 110c3a4

Please sign in to comment.