org.gradle.api.internal.tasks.compile.CleaningJavaCompiler Java Examples

The following examples show how to use org.gradle.api.internal.tasks.compile.CleaningJavaCompiler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IncrementalCompilerFactory.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public IncrementalCompilerFactory(FileOperations fileOperations, String compileDisplayName, CleaningJavaCompiler cleaningJavaCompiler,
                                  List<Object> source, CompileCaches compileCaches, IncrementalTaskInputsInternal inputs) {
    this.inputs = inputs;
    //bunch of services that enable incremental java compilation.
    Hasher hasher = new DefaultHasher(); //TODO SF use caching hasher
    ClassDependenciesAnalyzer analyzer = new CachingClassDependenciesAnalyzer(new DefaultClassDependenciesAnalyzer(), hasher, compileCaches.getClassAnalysisCache());
    JarSnapshotter jarSnapshotter = new CachingJarSnapshotter(hasher, analyzer, compileCaches.getJarSnapshotCache(), inputs.getInputFilesSnapshot());

    JarClasspathSnapshotMaker jarClasspathSnapshotMaker = new JarClasspathSnapshotMaker(compileCaches.getLocalJarClasspathSnapshotStore(), new JarClasspathSnapshotFactory(jarSnapshotter), new ClasspathJarFinder(fileOperations));
    CompilationSourceDirs sourceDirs = new CompilationSourceDirs(source);
    SourceToNameConverter sourceToNameConverter = new SourceToNameConverter(sourceDirs); //TODO SF replace with converter that parses input source class
    RecompilationSpecProvider recompilationSpecProvider = new RecompilationSpecProvider(sourceToNameConverter, fileOperations);
    ClassSetAnalysisUpdater classSetAnalysisUpdater = new ClassSetAnalysisUpdater(compileCaches.getLocalClassSetAnalysisStore(), fileOperations, analyzer);
    IncrementalCompilationInitializer compilationInitializer = new IncrementalCompilationInitializer(fileOperations);
    incrementalSupport = new IncrementalCompilerDecorator(jarClasspathSnapshotMaker, compileCaches, compilationInitializer,
            cleaningJavaCompiler, compileDisplayName, recompilationSpecProvider, classSetAnalysisUpdater, sourceDirs);
}
 
Example #2
Source File: IncrementalCompilerFactory.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public IncrementalCompilerFactory(FileOperations fileOperations, String compileDisplayName, CleaningJavaCompiler cleaningJavaCompiler,
                                  List<Object> source, CompileCaches compileCaches, IncrementalTaskInputsInternal inputs) {
    this.inputs = inputs;
    //bunch of services that enable incremental java compilation.
    Hasher hasher = new DefaultHasher(); //TODO SF use caching hasher
    ClassDependenciesAnalyzer analyzer = new CachingClassDependenciesAnalyzer(new DefaultClassDependenciesAnalyzer(), hasher, compileCaches.getClassAnalysisCache());
    JarSnapshotter jarSnapshotter = new CachingJarSnapshotter(hasher, analyzer, compileCaches.getJarSnapshotCache(), inputs.getInputFilesSnapshot());

    JarClasspathSnapshotMaker jarClasspathSnapshotMaker = new JarClasspathSnapshotMaker(compileCaches.getLocalJarClasspathSnapshotStore(), new JarClasspathSnapshotFactory(jarSnapshotter), new ClasspathJarFinder(fileOperations));
    CompilationSourceDirs sourceDirs = new CompilationSourceDirs(source);
    SourceToNameConverter sourceToNameConverter = new SourceToNameConverter(sourceDirs); //TODO SF replace with converter that parses input source class
    RecompilationSpecProvider recompilationSpecProvider = new RecompilationSpecProvider(sourceToNameConverter, fileOperations);
    ClassSetAnalysisUpdater classSetAnalysisUpdater = new ClassSetAnalysisUpdater(compileCaches.getLocalClassSetAnalysisStore(), fileOperations, analyzer);
    IncrementalCompilationInitializer compilationInitializer = new IncrementalCompilationInitializer(fileOperations);
    incrementalSupport = new IncrementalCompilerDecorator(jarClasspathSnapshotMaker, compileCaches, compilationInitializer,
            cleaningJavaCompiler, compileDisplayName, recompilationSpecProvider, classSetAnalysisUpdater, sourceDirs);
}
 
Example #3
Source File: SelectiveCompiler.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public SelectiveCompiler(IncrementalTaskInputs inputs, PreviousCompilation previousCompilation, CleaningJavaCompiler cleaningCompiler,
                         RecompilationSpecProvider recompilationSpecProvider, IncrementalCompilationInitializer compilationInitializer, JarClasspathSnapshotProvider jarClasspathSnapshotProvider) {
    this.inputs = inputs;
    this.previousCompilation = previousCompilation;
    this.cleaningCompiler = cleaningCompiler;
    this.recompilationSpecProvider = recompilationSpecProvider;
    this.incrementalCompilationInitilizer = compilationInitializer;
    this.jarClasspathSnapshotProvider = jarClasspathSnapshotProvider;
}
 
Example #4
Source File: IncrementalCompilerDecorator.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public IncrementalCompilerDecorator(JarClasspathSnapshotMaker jarClasspathSnapshotMaker, CompileCaches compileCaches,
                                    IncrementalCompilationInitializer compilationInitializer, CleaningJavaCompiler cleaningCompiler, String displayName,
                                    RecompilationSpecProvider staleClassDetecter, ClassSetAnalysisUpdater classSetAnalysisUpdater,
                                    CompilationSourceDirs sourceDirs) {
    this.jarClasspathSnapshotMaker = jarClasspathSnapshotMaker;
    this.compileCaches = compileCaches;
    this.compilationInitializer = compilationInitializer;
    this.cleaningCompiler = cleaningCompiler;
    this.displayName = displayName;
    this.staleClassDetecter = staleClassDetecter;
    this.classSetAnalysisUpdater = classSetAnalysisUpdater;
    this.sourceDirs = sourceDirs;
}
 
Example #5
Source File: SelectiveCompiler.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public SelectiveCompiler(IncrementalTaskInputs inputs, PreviousCompilation previousCompilation, CleaningJavaCompiler cleaningCompiler,
                         RecompilationSpecProvider recompilationSpecProvider, IncrementalCompilationInitializer compilationInitializer, JarClasspathSnapshotProvider jarClasspathSnapshotProvider) {
    this.inputs = inputs;
    this.previousCompilation = previousCompilation;
    this.cleaningCompiler = cleaningCompiler;
    this.recompilationSpecProvider = recompilationSpecProvider;
    this.incrementalCompilationInitilizer = compilationInitializer;
    this.jarClasspathSnapshotProvider = jarClasspathSnapshotProvider;
}
 
Example #6
Source File: IncrementalCompilerDecorator.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public IncrementalCompilerDecorator(JarClasspathSnapshotMaker jarClasspathSnapshotMaker, CompileCaches compileCaches,
                                    IncrementalCompilationInitializer compilationInitializer, CleaningJavaCompiler cleaningCompiler, String displayName,
                                    RecompilationSpecProvider staleClassDetecter, ClassSetAnalysisUpdater classSetAnalysisUpdater,
                                    CompilationSourceDirs sourceDirs) {
    this.jarClasspathSnapshotMaker = jarClasspathSnapshotMaker;
    this.compileCaches = compileCaches;
    this.compilationInitializer = compilationInitializer;
    this.cleaningCompiler = cleaningCompiler;
    this.displayName = displayName;
    this.staleClassDetecter = staleClassDetecter;
    this.classSetAnalysisUpdater = classSetAnalysisUpdater;
    this.sourceDirs = sourceDirs;
}
 
Example #7
Source File: JavaCompile.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private CleaningJavaCompiler createCompiler(JavaCompileSpec spec) {
    // TODO:DAZ Supply the target platform to the task, using the compatibility flags as overrides
    // Or maybe split the legacy compile task from the new one
    Compiler<JavaCompileSpec> javaCompiler = ((JavaToolChainInternal) getToolChain()).select(getPlatform()).newCompiler(spec);
    return new CleaningJavaCompiler(javaCompiler, getAntBuilderFactory(), getOutputs());
}
 
Example #8
Source File: JavaCompile.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
private CleaningJavaCompiler createCompiler(JavaCompileSpec spec) {
    Compiler<JavaCompileSpec> javaCompiler = CompilerUtil.castCompiler(((JavaToolChainInternal) getToolChain()).select(getPlatform()).newCompiler(spec.getClass()));
    return new CleaningJavaCompiler(javaCompiler, getOutputs());
}
 
Example #9
Source File: JavaCompile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private CleaningJavaCompiler createCompiler(JavaCompileSpec spec) {
    // TODO:DAZ Supply the target platform to the task, using the compatibility flags as overrides
    // Or maybe split the legacy compile task from the new one
    Compiler<JavaCompileSpec> javaCompiler = ((JavaToolChainInternal) getToolChain()).select(getPlatform()).newCompiler(spec);
    return new CleaningJavaCompiler(javaCompiler, getAntBuilderFactory(), getOutputs());
}