Search in sources :

Example 1 with ClassFilesAnalyzer

use of org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassFilesAnalyzer in project gradle by gradle.

the class ClassSetAnalysisUpdater method updateAnalysis.

public void updateAnalysis(JavaCompileSpec spec) {
    Timer clock = Timers.startTimer();
    Set<File> baseDirs = Sets.newLinkedHashSet();
    baseDirs.add(spec.getDestinationDir());
    Iterables.addAll(baseDirs, Iterables.filter(spec.getCompileClasspath(), IS_CLASS_DIRECTORY));
    ClassFilesAnalyzer analyzer = new ClassFilesAnalyzer(this.analyzer, fileHasher);
    for (File baseDir : baseDirs) {
        fileOperations.fileTree(baseDir).visit(analyzer);
    }
    ClassSetAnalysisData data = analyzer.getAnalysis();
    stash.put(data);
    LOG.info("Class dependency analysis for incremental compilation took {}.", clock.getElapsed());
}
Also used : Timer(org.gradle.internal.time.Timer) ClassFilesAnalyzer(org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassFilesAnalyzer) ClassSetAnalysisData(org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData) File(java.io.File)

Aggregations

File (java.io.File)1 ClassFilesAnalyzer (org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassFilesAnalyzer)1 ClassSetAnalysisData (org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData)1 Timer (org.gradle.internal.time.Timer)1