HHH-8733 - General build cleanup

This commit is contained in:
Steve Ebersole 2013-11-22 15:28:28 -06:00
parent 608bdefc9a
commit 1b3829a95d
1 changed files with 13 additions and 4 deletions

View File

@ -171,9 +171,6 @@ subprojects { subProject ->
sourceSets.all {
ext.aptGeneratedSourceDir = file( "${buildDir}/generated-src/apt/${name}" )
if ( !aptGeneratedSourceDir.exists() ) {
aptGeneratedSourceDir.mkdirs()
}
}
tasks.withType( JavaCompile.class ).all { task->
@ -197,6 +194,12 @@ subprojects { subProject ->
"-AskipTranslations=true",
"-AtranslationFilesPath=${project.rootDir}/src/main/resources"
]
doFirst {
if ( !sourceSets.main.aptGeneratedSourceDir.exists() ) {
sourceSets.main.aptGeneratedSourceDir.mkdirs()
}
}
}
// alter the compileTestJava (src/test/java javac task) to add AP hooks
@ -204,9 +207,15 @@ subprojects { subProject ->
options.compilerArgs += [
"-s", "$sourceSets.test.aptGeneratedSourceDir.absolutePath"
]
doFirst {
if ( !sourceSets.test.aptGeneratedSourceDir.exists() ) {
sourceSets.test.aptGeneratedSourceDir.mkdirs()
}
}
}
task generateSources( type: Task )
task generateSources(type: Task)
jar {
Set<String> exportPackages = new HashSet<String>()