Kapt: Remove generated output directory each time before annotation processing

(cherry picked from commit c4b772a)
This commit is contained in:
Yan Zhulanow
2016-09-01 17:21:35 +03:00
committed by Yan Zhulanow
parent 32d77e5226
commit 00355f3c52
5 changed files with 104 additions and 0 deletions
@@ -87,6 +87,10 @@ abstract class AbstractAnnotationProcessingExtension(
return null
}
// Clean the generated source directory even if we don't run any annotation processors
generatedSourcesOutputDir.deleteRecursively()
generatedSourcesOutputDir.mkdirs()
val processors = loadAnnotationProcessors()
if (processors.isEmpty()) {
log { "No annotation processors detected, exiting" }