Search in sources :

Example 1 with CachingClassDependenciesAnalyzer

use of org.gradle.api.internal.tasks.compile.incremental.analyzer.CachingClassDependenciesAnalyzer 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);
}
Also used : CachingClassDependenciesAnalyzer(org.gradle.api.internal.tasks.compile.incremental.analyzer.CachingClassDependenciesAnalyzer) DefaultClassDependenciesAnalyzer(org.gradle.api.internal.tasks.compile.incremental.analyzer.DefaultClassDependenciesAnalyzer) ClassDependenciesAnalyzer(org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassDependenciesAnalyzer) DefaultClassDependenciesAnalyzer(org.gradle.api.internal.tasks.compile.incremental.analyzer.DefaultClassDependenciesAnalyzer) JarClasspathSnapshotMaker(org.gradle.api.internal.tasks.compile.incremental.jar.JarClasspathSnapshotMaker) ClasspathJarFinder(org.gradle.api.internal.tasks.compile.incremental.jar.ClasspathJarFinder) CompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches) GeneralCompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches) JarSnapshotter(org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshotter) CachingJarSnapshotter(org.gradle.api.internal.tasks.compile.incremental.jar.CachingJarSnapshotter) CachingClassDependenciesAnalyzer(org.gradle.api.internal.tasks.compile.incremental.analyzer.CachingClassDependenciesAnalyzer) JarClasspathSnapshotFactory(org.gradle.api.internal.tasks.compile.incremental.jar.JarClasspathSnapshotFactory) CachingJarSnapshotter(org.gradle.api.internal.tasks.compile.incremental.jar.CachingJarSnapshotter)

Aggregations

CachingClassDependenciesAnalyzer (org.gradle.api.internal.tasks.compile.incremental.analyzer.CachingClassDependenciesAnalyzer)1 ClassDependenciesAnalyzer (org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassDependenciesAnalyzer)1 DefaultClassDependenciesAnalyzer (org.gradle.api.internal.tasks.compile.incremental.analyzer.DefaultClassDependenciesAnalyzer)1 CompileCaches (org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches)1 GeneralCompileCaches (org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches)1 CachingJarSnapshotter (org.gradle.api.internal.tasks.compile.incremental.jar.CachingJarSnapshotter)1 ClasspathJarFinder (org.gradle.api.internal.tasks.compile.incremental.jar.ClasspathJarFinder)1 JarClasspathSnapshotFactory (org.gradle.api.internal.tasks.compile.incremental.jar.JarClasspathSnapshotFactory)1 JarClasspathSnapshotMaker (org.gradle.api.internal.tasks.compile.incremental.jar.JarClasspathSnapshotMaker)1 JarSnapshotter (org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshotter)1