org.gradle.api.internal.file.FileOperations Java Examples

The following examples show how to use org.gradle.api.internal.file.FileOperations. 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: DefaultScript.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void init(final Object target, ServiceRegistry services) {
    super.init(target, services);
    this.__scriptServices = services;
    loggingManager = services.get(LoggingManager.class);
    Instantiator instantiator = services.get(Instantiator.class);
    FileLookup fileLookup = services.get(FileLookup.class);
    if (target instanceof FileOperations) {
        fileOperations = (FileOperations) target;
    } else if (getScriptSource().getResource().getFile() != null) {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(getScriptSource().getResource().getFile().getParentFile()), null, null, instantiator, fileLookup);
    } else {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup);
    }

    processOperations = (ProcessOperations) fileOperations;
}
 
Example #2
Source File: DefaultScript.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void init(final Object target, ServiceRegistry services) {
    super.init(target, services);
    this.__scriptServices = services;
    loggingManager = services.get(LoggingManager.class);
    Instantiator instantiator = services.get(Instantiator.class);
    FileLookup fileLookup = services.get(FileLookup.class);
    if (target instanceof FileOperations) {
        fileOperations = (FileOperations) target;
    } else if (getScriptSource().getResource().getFile() != null) {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(getScriptSource().getResource().getFile().getParentFile()), null, null, instantiator, fileLookup);
    } else {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup);
    }

    processOperations = (ProcessOperations) fileOperations;
}
 
Example #3
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 #4
Source File: FileCollectionBackedArchiveTextResource.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public FileCollectionBackedArchiveTextResource(final FileOperations fileOperations,
                                               final TemporaryFileProvider tempFileProvider,
                                               final FileCollection fileCollection,
                                               final String path, Charset charset) {
    super(tempFileProvider, new LazilyInitializedFileTree() {
        @Override
        public FileTree createDelegate() {
            File archiveFile = fileCollection.getSingleFile();
            String fileExtension = Files.getFileExtension(archiveFile.getName());
            FileTree archiveContents = fileExtension.equals("jar") || fileExtension.equals("zip")
                    ? fileOperations.zipTree(archiveFile) : fileOperations.tarTree(archiveFile);
            PatternSet patternSet = new PatternSet();
            patternSet.include(path);
            return archiveContents.matching(patternSet);
        }
        public TaskDependency getBuildDependencies() {
            return fileCollection.getBuildDependencies();
        }
    }, charset);
}
 
Example #5
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 #6
Source File: FileCollectionBackedArchiveTextResource.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public FileCollectionBackedArchiveTextResource(final FileOperations fileOperations,
                                               final TemporaryFileProvider tempFileProvider,
                                               final FileCollection fileCollection,
                                               final String path, Charset charset) {
    super(tempFileProvider, new LazilyInitializedFileTree() {
        @Override
        public FileTree createDelegate() {
            File archiveFile = fileCollection.getSingleFile();
            String fileExtension = Files.getFileExtension(archiveFile.getName());
            FileTree archiveContents = fileExtension.equals("jar") || fileExtension.equals("zip")
                    ? fileOperations.zipTree(archiveFile) : fileOperations.tarTree(archiveFile);
            PatternSet patternSet = new PatternSet();
            patternSet.include(path);
            return archiveContents.matching(patternSet);
        }
        public TaskDependency getBuildDependencies() {
            return fileCollection.getBuildDependencies();
        }
    }, charset);
}
 
Example #7
Source File: DefaultScript.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void init(final Object target, ServiceRegistry services) {
    super.init(target, services);
    this.__scriptServices = services;
    loggingManager = services.get(LoggingManager.class);
    Instantiator instantiator = services.get(Instantiator.class);
    FileLookup fileLookup = services.get(FileLookup.class);
    if (target instanceof FileOperations) {
        fileOperations = (FileOperations) target;
    } else if (getScriptSource().getResource().getFile() != null) {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(getScriptSource().getResource().getFile().getParentFile()), null, null, instantiator, fileLookup);
    } else {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup);
    }

    processOperations = (ProcessOperations) fileOperations;
}
 
Example #8
Source File: DefaultScript.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void init(final Object target, ServiceRegistry services) {
    super.init(target, services);
    this.__scriptServices = services;
    loggingManager = services.get(LoggingManager.class);
    Instantiator instantiator = services.get(Instantiator.class);
    FileLookup fileLookup = services.get(FileLookup.class);
    if (target instanceof FileOperations) {
        fileOperations = (FileOperations) target;
    } else if (getScriptSource().getResource().getFile() != null) {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(getScriptSource().getResource().getFile().getParentFile()), null, null, instantiator, fileLookup);
    } else {
        fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup);
    }

    processOperations = (ProcessOperations) fileOperations;
}
 
Example #9
Source File: JavaScriptMinify.java    From playframework with Apache License 2.0 5 votes vote down vote up
@Override
public void visitFile(final FileVisitDetails fileDetails) {
    final File outputFileDir = new File(destinationDir.get().getAsFile(), fileDetails.getRelativePath().getParent().getPathString());

    // Copy the raw form
    FileOperations fileOperations = ((ProjectInternal) getProject()).getFileOperations();
    fileOperations.copy(copySpec -> copySpec.from(fileDetails.getFile()).into(outputFileDir));

    // Capture the relative file
    relativeFiles.add(new RelativeFile(fileDetails.getFile(), fileDetails.getRelativePath()));
}
 
Example #10
Source File: SelectiveCompilation.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public SelectiveCompilation(IncrementalTaskInputs inputs, FileTree source, FileCollection compileClasspath, final File compileDestination,
                            final ClassDependencyInfoSerializer dependencyInfoSerializer, final JarSnapshotCache jarSnapshotCache, final SelectiveJavaCompiler compiler,
                            Iterable<File> sourceDirs, final FileOperations operations) {
    this.operations = operations;
    this.jarSnapshotFeeder = new JarSnapshotFeeder(jarSnapshotCache, new JarSnapshotter(new DefaultHasher()));
    this.compiler = compiler;

    Clock clock = new Clock();
    final InputOutputMapper mapper = new InputOutputMapper(sourceDirs, compileDestination);

    //load dependency info
    final ClassDependencyInfo dependencyInfo = dependencyInfoSerializer.readInfo();

    //including only source java classes that were changed
    final PatternSet changedSourceOnly = new PatternSet();
    InputFileDetailsAction action = new InputFileDetailsAction(mapper, compiler, changedSourceOnly, dependencyInfo);
    inputs.outOfDate(action);
    inputs.removed(action);
    if (fullRebuildNeeded != null) {
        LOG.lifecycle("Stale classes detection completed in {}. Rebuild needed: {}.", clock.getTime(), fullRebuildNeeded);
        this.classpath = compileClasspath;
        this.source = source;
        return;
    }

    compiler.deleteStaleClasses();
    Set<File> filesToCompile = source.matching(changedSourceOnly).getFiles();
    if (filesToCompile.isEmpty()) {
        this.compilationNeeded = false;
        this.classpath = compileClasspath;
        this.source = source;
    } else {
        this.classpath = compileClasspath.plus(new SimpleFileCollection(compileDestination));
        this.source = source.matching(changedSourceOnly);
    }
    LOG.lifecycle("Stale classes detection completed in {}. Compile include patterns: {}.", clock.getTime(), changedSourceOnly.getIncludes());
}
 
Example #11
Source File: Compile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private boolean maybeCompileIncrementally(IncrementalTaskInputs inputs) {
    if (!compileOptions.isIncremental()) {
        return false;
    }
    //hack
    List<File> sourceDirs = getSourceDirs();
    if (sourceDirs.isEmpty()) {
        LOG.lifecycle("{} cannot run incrementally because Gradle cannot infer the source directories.", getPath());
        return false;
    }
    if (!inputs.isIncremental()) {
        LOG.lifecycle("{} is not incremental (e.g. outputs have changed, no previous execution, etc). Using regular compile.", getPath());
        return false;
    }
    ClassDependencyInfoSerializer dependencyInfoSerializer = getDependencyInfoSerializer();
    if (!dependencyInfoSerializer.isInfoAvailable()) {
        //TODO SF let's unit test a scenario when after regular compilation incremental compilation is scheduled
        LOG.lifecycle("{} is not incremental because there is no class dependency data left from previous incremental build.", getPath());
        return false;
    }

    SingleMessageLogger.incubatingFeatureUsed("Incremental java compilation");

    SelectiveJavaCompiler compiler = new SelectiveJavaCompiler(javaCompiler, getProject().fileTree(getDestinationDir()));
    SelectiveCompilation selectiveCompilation = new SelectiveCompilation(inputs, getSource(), getClasspath(), getDestinationDir(),
            dependencyInfoSerializer, getJarSnapshotCache(), compiler, sourceDirs, (FileOperations) getProject());

    if (!selectiveCompilation.getCompilationNeeded()) {
        LOG.lifecycle("{} does not require recompilation. Skipping the compiler.", getPath());
        return true;
    }

    Clock clock = new Clock();
    performCompilation(selectiveCompilation.getSource(), selectiveCompilation.getClasspath(), selectiveCompilation.getFullRebuildRequired()? cleaningCompiler : compiler);
    LOG.lifecycle("{} - incremental compilation took {}", getPath(), clock.getTime());

    return true;
}
 
Example #12
Source File: JavaCompile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@TaskAction
protected void compile(IncrementalTaskInputs inputs) {
    if (!compileOptions.isIncremental()) {
        compile();
        return;
    }

    SingleMessageLogger.incubatingFeatureUsed("Incremental java compilation");

    DefaultJavaCompileSpec spec = createSpec();
    final CacheRepository repository1 = getCacheRepository();
    final JavaCompile javaCompile1 = this;
    final GeneralCompileCaches generalCaches1 = getGeneralCompileCaches();
    CompileCaches compileCaches = new CompileCaches() {
        private final CacheRepository repository = repository1;
        private final JavaCompile javaCompile = javaCompile1;
        private final GeneralCompileCaches generalCaches = generalCaches1;

        public ClassAnalysisCache getClassAnalysisCache() {
            return generalCaches.getClassAnalysisCache();
        }

        public JarSnapshotCache getJarSnapshotCache() {
            return generalCaches.getJarSnapshotCache();
        }

        public LocalJarClasspathSnapshotStore getLocalJarClasspathSnapshotStore() {
            return new LocalJarClasspathSnapshotStore(repository, javaCompile);
        }

        public LocalClassSetAnalysisStore getLocalClassSetAnalysisStore() {
            return new LocalClassSetAnalysisStore(repository, javaCompile);
        }
    };
    IncrementalCompilerFactory factory = new IncrementalCompilerFactory(
            (FileOperations) getProject(), getPath(), createCompiler(spec), source, compileCaches, (IncrementalTaskInputsInternal) inputs);
    Compiler<JavaCompileSpec> compiler = factory.createCompiler();
    performCompilation(spec, compiler);
}
 
Example #13
Source File: SelectiveCompilation.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public SelectiveCompilation(IncrementalTaskInputs inputs, FileTree source, FileCollection compileClasspath, final File compileDestination,
                            final ClassDependencyInfoSerializer dependencyInfoSerializer, final JarSnapshotCache jarSnapshotCache, final SelectiveJavaCompiler compiler,
                            Iterable<File> sourceDirs, final FileOperations operations) {
    this.operations = operations;
    this.jarSnapshotFeeder = new JarSnapshotFeeder(jarSnapshotCache, new JarSnapshotter(new DefaultHasher()));
    this.compiler = compiler;

    Clock clock = new Clock();
    final InputOutputMapper mapper = new InputOutputMapper(sourceDirs, compileDestination);

    //load dependency info
    final ClassDependencyInfo dependencyInfo = dependencyInfoSerializer.readInfo();

    //including only source java classes that were changed
    final PatternSet changedSourceOnly = new PatternSet();
    InputFileDetailsAction action = new InputFileDetailsAction(mapper, compiler, changedSourceOnly, dependencyInfo);
    inputs.outOfDate(action);
    inputs.removed(action);
    if (fullRebuildNeeded != null) {
        LOG.lifecycle("Stale classes detection completed in {}. Rebuild needed: {}.", clock.getTime(), fullRebuildNeeded);
        this.classpath = compileClasspath;
        this.source = source;
        return;
    }

    compiler.deleteStaleClasses();
    Set<File> filesToCompile = source.matching(changedSourceOnly).getFiles();
    if (filesToCompile.isEmpty()) {
        this.compilationNeeded = false;
        this.classpath = compileClasspath;
        this.source = source;
    } else {
        this.classpath = compileClasspath.plus(new SimpleFileCollection(compileDestination));
        this.source = source.matching(changedSourceOnly);
    }
    LOG.lifecycle("Stale classes detection completed in {}. Compile include patterns: {}.", clock.getTime(), changedSourceOnly.getIncludes());
}
 
Example #14
Source File: Compile.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private boolean maybeCompileIncrementally(IncrementalTaskInputs inputs) {
    if (!compileOptions.isIncremental()) {
        return false;
    }
    //hack
    List<File> sourceDirs = getSourceDirs();
    if (sourceDirs.isEmpty()) {
        LOG.lifecycle("{} cannot run incrementally because Gradle cannot infer the source directories.", getPath());
        return false;
    }
    if (!inputs.isIncremental()) {
        LOG.lifecycle("{} is not incremental (e.g. outputs have changed, no previous execution, etc). Using regular compile.", getPath());
        return false;
    }
    ClassDependencyInfoSerializer dependencyInfoSerializer = getDependencyInfoSerializer();
    if (!dependencyInfoSerializer.isInfoAvailable()) {
        //TODO SF let's unit test a scenario when after regular compilation incremental compilation is scheduled
        LOG.lifecycle("{} is not incremental because there is no class dependency data left from previous incremental build.", getPath());
        return false;
    }

    SingleMessageLogger.incubatingFeatureUsed("Incremental java compilation");

    SelectiveJavaCompiler compiler = new SelectiveJavaCompiler(javaCompiler, getProject().fileTree(getDestinationDir()));
    SelectiveCompilation selectiveCompilation = new SelectiveCompilation(inputs, getSource(), getClasspath(), getDestinationDir(),
            dependencyInfoSerializer, getJarSnapshotCache(), compiler, sourceDirs, (FileOperations) getProject());

    if (!selectiveCompilation.getCompilationNeeded()) {
        LOG.lifecycle("{} does not require recompilation. Skipping the compiler.", getPath());
        return true;
    }

    Clock clock = new Clock();
    performCompilation(selectiveCompilation.getSource(), selectiveCompilation.getClasspath(), selectiveCompilation.getFullRebuildRequired()? cleaningCompiler : compiler);
    LOG.lifecycle("{} - incremental compilation took {}", getPath(), clock.getTime());

    return true;
}
 
Example #15
Source File: JavaCompile.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@TaskAction
protected void compile(IncrementalTaskInputs inputs) {
    if (!compileOptions.isIncremental()) {
        compile();
        return;
    }

    SingleMessageLogger.incubatingFeatureUsed("Incremental java compilation");

    DefaultJavaCompileSpec spec = createSpec();
    final CacheRepository repository1 = getCacheRepository();
    final JavaCompile javaCompile1 = this;
    final GeneralCompileCaches generalCaches1 = getGeneralCompileCaches();
    CompileCaches compileCaches = new CompileCaches() {
        private final CacheRepository repository = repository1;
        private final JavaCompile javaCompile = javaCompile1;
        private final GeneralCompileCaches generalCaches = generalCaches1;

        public ClassAnalysisCache getClassAnalysisCache() {
            return generalCaches.getClassAnalysisCache();
        }

        public JarSnapshotCache getJarSnapshotCache() {
            return generalCaches.getJarSnapshotCache();
        }

        public LocalJarClasspathSnapshotStore getLocalJarClasspathSnapshotStore() {
            return new LocalJarClasspathSnapshotStore(repository, javaCompile);
        }

        public LocalClassSetAnalysisStore getLocalClassSetAnalysisStore() {
            return new LocalClassSetAnalysisStore(repository, javaCompile);
        }
    };
    IncrementalCompilerFactory factory = new IncrementalCompilerFactory(
            (FileOperations) getProject(), getPath(), createCompiler(spec), source, compileCaches, (IncrementalTaskInputsInternal) inputs);
    Compiler<JavaCompileSpec> compiler = factory.createCompiler();
    performCompilation(spec, compiler);
}
 
Example #16
Source File: RecompilationSpecProvider.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public RecompilationSpecProvider(SourceToNameConverter sourceToNameConverter, FileOperations fileOperations) {
    this.sourceToNameConverter = sourceToNameConverter;
    this.fileOperations = fileOperations;
}
 
Example #17
Source File: DefaultDistributionContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultDistributionContainer(Class<Distribution> type, Instantiator instantiator, FileOperations fileOperations) {
    super(type, instantiator);
    this.fileOperations = fileOperations;
}
 
Example #18
Source File: JarChangeProcessor.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public JarChangeProcessor(FileOperations fileOperations, JarClasspathSnapshot jarClasspathSnapshot, PreviousCompilation previousCompilation) {
    this.fileOperations = fileOperations;
    this.jarClasspathSnapshot = jarClasspathSnapshot;
    this.previousCompilation = previousCompilation;
}
 
Example #19
Source File: ClasspathJarFinder.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ClasspathJarFinder(FileOperations fileOperations) {
    this.fileOperations = fileOperations;
}
 
Example #20
Source File: DefaultDistributionContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultDistributionContainer(Class<Distribution> type, Instantiator instantiator, FileOperations fileOperations) {
    super(type, instantiator);
    this.fileOperations = fileOperations;
}
 
Example #21
Source File: ClassSetAnalysisUpdater.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ClassSetAnalysisUpdater(Stash<ClassSetAnalysisData> stash, FileOperations fileOperations, ClassDependenciesAnalyzer analyzer) {
    this.stash = stash;
    this.fileOperations = fileOperations;
    this.analyzer = analyzer;
}
 
Example #22
Source File: DefaultTextResourceFactory.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultTextResourceFactory(FileOperations fileOperations, TemporaryFileProvider tempFileProvider) {
    this.fileOperations = fileOperations;
    this.tempFileProvider = tempFileProvider;
}
 
Example #23
Source File: RecompilationSpecProvider.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public RecompilationSpecProvider(SourceToNameConverter sourceToNameConverter, FileOperations fileOperations) {
    this.sourceToNameConverter = sourceToNameConverter;
    this.fileOperations = fileOperations;
}
 
Example #24
Source File: DefaultResourceHandler.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultResourceHandler(FileOperations fileOperations, TemporaryFileProvider tempFileProvider) {
    this.fileOperations = fileOperations;
    textResourceFactory = new DefaultTextResourceFactory(fileOperations, tempFileProvider);
}
 
Example #25
Source File: AbstractProject.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Inject
protected FileOperations getFileOperations() {
    // Decoration takes care of the implementation
    throw new UnsupportedOperationException();
}
 
Example #26
Source File: IncrementalCompilationInitializer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public IncrementalCompilationInitializer(FileOperations fileOperations) {
    this.fileOperations = fileOperations;
}
 
Example #27
Source File: DefaultDistributionContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultDistributionContainer(Class<Distribution> type, Instantiator instantiator, FileOperations fileOperations) {
    super(type, instantiator);
    this.fileOperations = fileOperations;
}
 
Example #28
Source File: IncrementalCompilationInitializer.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public IncrementalCompilationInitializer(FileOperations fileOperations) {
    this.fileOperations = fileOperations;
}
 
Example #29
Source File: ClassSetAnalysisUpdater.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ClassSetAnalysisUpdater(Stash<ClassSetAnalysisData> stash, FileOperations fileOperations, ClassDependenciesAnalyzer analyzer) {
    this.stash = stash;
    this.fileOperations = fileOperations;
    this.analyzer = analyzer;
}
 
Example #30
Source File: ClasspathJarFinder.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ClasspathJarFinder(FileOperations fileOperations) {
    this.fileOperations = fileOperations;
}