Search in sources :

Example 1 with BuildTargetConfiguration

use of org.jetbrains.jps.incremental.storage.BuildTargetConfiguration in project intellij-community by JetBrains.

the class BuildOperations method ensureFSStateInitialized.

public static void ensureFSStateInitialized(CompileContext context, BuildTarget<?> target) throws IOException {
    final ProjectDescriptor pd = context.getProjectDescriptor();
    final Timestamps timestamps = pd.timestamps.getStorage();
    final BuildTargetConfiguration configuration = pd.getTargetsState().getTargetConfiguration(target);
    if (JavaBuilderUtil.isForcedRecompilationAllJavaModules(context)) {
        FSOperations.markDirtyFiles(context, target, CompilationRound.CURRENT, timestamps, true, null, null);
        pd.fsState.markInitialScanPerformed(target);
        configuration.save(context);
    } else if (context.getScope().isBuildForced(target) || configuration.isTargetDirty(context) || configuration.outputRootWasDeleted(context)) {
        initTargetFSState(context, target, true);
        if (!context.getScope().isBuildForced(target)) {
            // case when target build is forced, is handled separately
            IncProjectBuilder.clearOutputFiles(context, target);
        }
        pd.dataManager.cleanTargetStorages(target);
        configuration.save(context);
    } else if (!pd.fsState.isInitialScanPerformed(target)) {
        initTargetFSState(context, target, false);
    }
}
Also used : Timestamps(org.jetbrains.jps.incremental.storage.Timestamps) ProjectDescriptor(org.jetbrains.jps.cmdline.ProjectDescriptor) BuildTargetConfiguration(org.jetbrains.jps.incremental.storage.BuildTargetConfiguration)

Aggregations

ProjectDescriptor (org.jetbrains.jps.cmdline.ProjectDescriptor)1 BuildTargetConfiguration (org.jetbrains.jps.incremental.storage.BuildTargetConfiguration)1 Timestamps (org.jetbrains.jps.incremental.storage.Timestamps)1