use of org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysis in project gradle by gradle.
the class IncrementalCompilerDecorator method getCompiler.
private Compiler<JavaCompileSpec> getCompiler(IncrementalTaskInputs inputs, CompilationSourceDirs sourceDirs) {
if (!inputs.isIncremental()) {
LOG.lifecycle("{} - is not incremental (e.g. outputs have changed, no previous execution, etc.).", displayName);
return cleaningCompiler;
}
if (!sourceDirs.canInferSourceRoots()) {
LOG.lifecycle("{} - is not incremental. Unable to infer the source directories.", displayName);
return cleaningCompiler;
}
if (!annotationProcessorPath.isEmpty()) {
LOG.lifecycle("{} - is not incremental. Annotation processors are present.", displayName);
return cleaningCompiler;
}
ClassSetAnalysisData data = compileCaches.getLocalClassSetAnalysisStore().get();
if (data == null) {
LOG.lifecycle("{} - is not incremental. No class analysis data available from the previous build.", displayName);
return cleaningCompiler;
}
PreviousCompilation previousCompilation = new PreviousCompilation(new ClassSetAnalysis(data), compileCaches.getLocalJarClasspathSnapshotStore(), compileCaches.getJarSnapshotCache());
return new SelectiveCompiler(inputs, previousCompilation, cleaningCompiler, staleClassDetecter, compilationInitializer, jarClasspathSnapshotMaker);
}
Aggregations