Search in sources :

Example 1 with CompileCaches

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;
        }
    };
}
Also used : LocalClassSetAnalysisStore(org.gradle.api.internal.tasks.compile.incremental.deps.LocalClassSetAnalysisStore) CompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches) GeneralCompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches) LocalJarClasspathSnapshotStore(org.gradle.api.internal.tasks.compile.incremental.jar.LocalJarClasspathSnapshotStore) AnnotationProcessorPathStore(org.gradle.api.internal.tasks.compile.incremental.processing.AnnotationProcessorPathStore)

Example 2 with CompileCaches

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);
}
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)

Example 3 with CompileCaches

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;
        }
    };
}
Also used : GeneralCompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches) LocalClassSetAnalysisStore(org.gradle.api.internal.tasks.compile.incremental.deps.LocalClassSetAnalysisStore) CompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches) GeneralCompileCaches(org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches) LocalJarClasspathSnapshotStore(org.gradle.api.internal.tasks.compile.incremental.jar.LocalJarClasspathSnapshotStore)

Aggregations

CompileCaches (org.gradle.api.internal.tasks.compile.incremental.cache.CompileCaches)3 GeneralCompileCaches (org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches)3 LocalClassSetAnalysisStore (org.gradle.api.internal.tasks.compile.incremental.deps.LocalClassSetAnalysisStore)2 LocalJarClasspathSnapshotStore (org.gradle.api.internal.tasks.compile.incremental.jar.LocalJarClasspathSnapshotStore)2 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 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 AnnotationProcessorPathStore (org.gradle.api.internal.tasks.compile.incremental.processing.AnnotationProcessorPathStore)1