use of org.gradle.api.internal.tasks.compile.incremental.processing.AnnotationProcessorResult in project gradle by gradle.
the class AnnotationProcessingCompileTask method setupProcessors.
private void setupProcessors() {
processorClassloader = createProcessorClassLoader();
List<Processor> processors = new ArrayList<Processor>(processorDeclarations.size());
if (!processorDeclarations.isEmpty()) {
SupportedOptionsCollectingProcessor supportedOptionsCollectingProcessor = new SupportedOptionsCollectingProcessor();
for (AnnotationProcessorDeclaration declaredProcessor : processorDeclarations) {
AnnotationProcessorResult processorResult = new AnnotationProcessorResult(result, declaredProcessor.getClassName());
result.getAnnotationProcessorResults().add(processorResult);
Class<?> processorClass = loadProcessor(declaredProcessor);
Processor processor = instantiateProcessor(processorClass);
supportedOptionsCollectingProcessor.addProcessor(processor);
processor = decorateForIncrementalProcessing(processor, declaredProcessor.getType(), processorResult);
processor = decorateForTimeTracking(processor, processorResult);
processors.add(processor);
}
processors.add(supportedOptionsCollectingProcessor);
}
delegate.setProcessors(processors);
}
Aggregations