[KAPT] Skip kapt tasks if no annotations processors are provided (#4190)
So we don't do any preparation, don't spin up compiler. And user will see SKIPPED in task execution
This commit is contained in:
@@ -209,6 +209,7 @@ class Kapt3ComponentRegistrar : ComponentRegistrar {
|
||||
if (processingClasspath.isEmpty()) {
|
||||
// Skip annotation processing if no annotation processors were provided
|
||||
if (mode != AptMode.WITH_COMPILATION) {
|
||||
logger.info("No annotation processors provided. Skip KAPT processing.")
|
||||
abortAnalysis()
|
||||
}
|
||||
return false
|
||||
@@ -274,4 +275,4 @@ class Kapt3ComponentRegistrar : ComponentRegistrar {
|
||||
return AnalysisResult.success(bindingTrace.bindingContext, module, shouldGenerateCode = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user