Search in sources :

Example 6 with ClassSetAnalysisData

use of org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData in project gradle by gradle.

the class IncrementalResultStoringCompiler method storeResult.

private void storeResult(JavaCompileSpec spec, WorkResult result) {
    ClassSetAnalysisData outputSnapshot = classpathSnapshotter.analyzeOutputFolder(spec.getDestinationDir());
    ClassSetAnalysisData classpathSnapshot = classpathSnapshotter.getClasspathSnapshot(Iterables.concat(spec.getCompileClasspath(), spec.getModulePath()));
    AnnotationProcessingData annotationProcessingData = getAnnotationProcessingData(spec, result);
    CompilerApiData compilerApiData = getCompilerApiData(spec, result);
    ClassSetAnalysisData minimizedClasspathSnapshot = classpathSnapshot.reduceToTypesAffecting(outputSnapshot, compilerApiData);
    PreviousCompilationData data = new PreviousCompilationData(outputSnapshot, annotationProcessingData, minimizedClasspathSnapshot, compilerApiData);
    File previousCompilationDataFile = Objects.requireNonNull(spec.getCompileOptions().getPreviousCompilationDataFile());
    previousCompilationAccess.writePreviousCompilationData(data, previousCompilationDataFile);
}
Also used : AnnotationProcessingData(org.gradle.api.internal.tasks.compile.incremental.processing.AnnotationProcessingData) CompilerApiData(org.gradle.api.internal.tasks.compile.incremental.compilerapi.CompilerApiData) ClassSetAnalysisData(org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData) PreviousCompilationData(org.gradle.api.internal.tasks.compile.incremental.recomp.PreviousCompilationData) File(java.io.File)

Example 7 with ClassSetAnalysisData

use of org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData in project gradle by gradle.

the class CurrentCompilationAccess method analyzeOutputFolder.

public ClassSetAnalysisData analyzeOutputFolder(File outputFolder) {
    Timer clock = Time.startTimer();
    ClassSetAnalysisData snapshot = classSetAnalyzer.analyzeOutputFolder(outputFolder);
    LOG.info("Class dependency analysis for incremental compilation took {}.", clock.getElapsed());
    return snapshot;
}
Also used : Timer(org.gradle.internal.time.Timer) ClassSetAnalysisData(org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData)

Aggregations

ClassSetAnalysisData (org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData)7 Timer (org.gradle.internal.time.Timer)3 File (java.io.File)2 Set (java.util.Set)1 ClassFilesAnalyzer (org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassFilesAnalyzer)1 CompilationResultAnalyzer (org.gradle.api.internal.tasks.compile.incremental.analyzer.CompilationResultAnalyzer)1 CompilerApiData (org.gradle.api.internal.tasks.compile.incremental.compilerapi.CompilerApiData)1 AffectedClasses (org.gradle.api.internal.tasks.compile.incremental.deps.AffectedClasses)1 ClassSetAnalysis (org.gradle.api.internal.tasks.compile.incremental.deps.ClassSetAnalysis)1 DependentsSet (org.gradle.api.internal.tasks.compile.incremental.deps.DependentsSet)1 PreviousCompilation (org.gradle.api.internal.tasks.compile.incremental.jar.PreviousCompilation)1 AnnotationProcessingData (org.gradle.api.internal.tasks.compile.incremental.processing.AnnotationProcessingData)1 PreviousCompilationData (org.gradle.api.internal.tasks.compile.incremental.recomp.PreviousCompilationData)1 AnnotationProcessorDeclaration (org.gradle.api.internal.tasks.compile.processing.AnnotationProcessorDeclaration)1 HashCode (org.gradle.internal.hash.HashCode)1