If incremental KAPT is disabled, do not analyze classpath

When incremental apt mode in KAPT is disabled, do not analyze
classpath to determine the type of the annotation processors. Instead,
just mark them all as non-incremental.
This commit is contained in:
Ivan Gavrilovic
2019-05-14 11:23:52 +01:00
committed by Yan Zhulanow
parent a639607821
commit 72fdc648ff
@@ -55,6 +55,10 @@ open class ProcessorLoader(private val options: KaptOptions, private val logger:
}
private fun wrapInIncrementalProcessor(processors: List<Processor>, classpath: Iterable<File>): List<IncrementalProcessor> {
if (!options[KaptFlag.INCREMENTAL_APT]) {
return processors.map { IncrementalProcessor(it, DeclaredProcType.NON_INCREMENTAL) }
}
val processorNames = processors.map {it.javaClass.name}.toSet()
val processorsInfo: Map<String, DeclaredProcType> = getIncrementalProcessorsFromClasspath(processorNames, classpath)