use of org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches in project gradle by gradle.
the class IncrementalCompilerFactory method createCompileCaches.
private CompileCaches createCompileCaches(String path) {
final LocalClassSetAnalysisStore localClassSetAnalysisStore = generalCompileCaches.createLocalClassSetAnalysisStore(path);
final LocalJarClasspathSnapshotStore localJarClasspathSnapshotStore = generalCompileCaches.createLocalJarClasspathSnapshotStore(path);
final AnnotationProcessorPathStore annotationProcessorPathStore = generalCompileCaches.createAnnotationProcessorPathStore(path);
return new CompileCaches() {
public ClassAnalysisCache getClassAnalysisCache() {
return generalCompileCaches.getClassAnalysisCache();
}
public JarSnapshotCache getJarSnapshotCache() {
return generalCompileCaches.getJarSnapshotCache();
}
public LocalJarClasspathSnapshotStore getLocalJarClasspathSnapshotStore() {
return localJarClasspathSnapshotStore;
}
public LocalClassSetAnalysisStore getLocalClassSetAnalysisStore() {
return localClassSetAnalysisStore;
}
@Override
public AnnotationProcessorPathStore getAnnotationProcessorPathStore() {
return annotationProcessorPathStore;
}
};
}
use of org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches in project gradle by gradle.
the class IncrementalCompilerFactory method makeIncremental.
public Compiler<JavaCompileSpec> makeIncremental(CleaningJavaCompiler cleaningJavaCompiler, String compileDisplayName, IncrementalTaskInputsInternal inputs, List<Object> source, FileCollection annotationProcessorClasspath) {
CompileCaches compileCaches = createCompileCaches(compileDisplayName);
ClassDependenciesAnalyzer analyzer = new CachingClassDependenciesAnalyzer(new DefaultClassDependenciesAnalyzer(), compileCaches.getClassAnalysisCache());
JarSnapshotter jarSnapshotter = new CachingJarSnapshotter(streamHasher, fileHasher, analyzer, compileCaches.getJarSnapshotCache());
JarClasspathSnapshotMaker jarClasspathSnapshotMaker = new JarClasspathSnapshotMaker(compileCaches.getLocalJarClasspathSnapshotStore(), new JarClasspathSnapshotFactory(jarSnapshotter), new ClasspathJarFinder(fileOperations));
CompilationSourceDirs sourceDirs = new CompilationSourceDirs(source);
SourceToNameConverter sourceToNameConverter = new SourceToNameConverter(sourceDirs);
RecompilationSpecProvider recompilationSpecProvider = new RecompilationSpecProvider(sourceToNameConverter, fileOperations);
ClassSetAnalysisUpdater classSetAnalysisUpdater = new ClassSetAnalysisUpdater(compileCaches.getLocalClassSetAnalysisStore(), fileOperations, analyzer, fileHasher);
IncrementalCompilationInitializer compilationInitializer = new IncrementalCompilationInitializer(fileOperations);
IncrementalCompilerDecorator incrementalSupport = new IncrementalCompilerDecorator(jarClasspathSnapshotMaker, compileCaches, compilationInitializer, cleaningJavaCompiler, compileDisplayName, recompilationSpecProvider, classSetAnalysisUpdater, sourceDirs, annotationProcessorClasspath, annotationProcessorDetector);
return incrementalSupport.prepareCompiler(inputs);
}
use of org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches in project gradle by gradle.
the class JavaCompile method createCompileCaches.
private CompileCaches createCompileCaches() {
final GeneralCompileCaches generalCaches = getGeneralCompileCaches();
final LocalClassSetAnalysisStore localClassSetAnalysisStore = generalCaches.createLocalClassSetAnalysisStore(getPath());
final LocalJarClasspathSnapshotStore localJarClasspathSnapshotStore = generalCaches.createLocalJarClasspathSnapshotStore(getPath());
return new CompileCaches() {
public ClassAnalysisCache getClassAnalysisCache() {
return generalCaches.getClassAnalysisCache();
}
public JarSnapshotCache getJarSnapshotCache() {
return generalCaches.getJarSnapshotCache();
}
public LocalJarClasspathSnapshotStore getLocalJarClasspathSnapshotStore() {
return localJarClasspathSnapshotStore;
}
public LocalClassSetAnalysisStore getLocalClassSetAnalysisStore() {
return localClassSetAnalysisStore;
}
};
}
Aggregations