mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not rebuild artifacts on project rebuild (IDEA-94132)
This commit is contained in:
@@ -187,9 +187,15 @@ public class CompileDriver {
|
||||
}
|
||||
|
||||
public void rebuild(CompileStatusNotification callback) {
|
||||
CompileScope projectScope = ArtifactCompileScope.createScopeWithArtifacts(new ProjectCompileScope(myProject),
|
||||
ArtifactUtil.getArtifactWithOutputPaths(myProject), false);
|
||||
final CompileScope compileScope = useOutOfProcessBuild() ? projectScope : addAdditionalRoots(projectScope, ALL_EXCEPT_SOURCE_PROCESSING);
|
||||
final CompileScope compileScope;
|
||||
ProjectCompileScope projectScope = new ProjectCompileScope(myProject);
|
||||
if (useOutOfProcessBuild()) {
|
||||
compileScope = projectScope;
|
||||
}
|
||||
else {
|
||||
CompileScope scopeWithArtifacts = ArtifactCompileScope.createScopeWithArtifacts(projectScope, ArtifactUtil.getArtifactWithOutputPaths(myProject), false);
|
||||
compileScope = addAdditionalRoots(scopeWithArtifacts, ALL_EXCEPT_SOURCE_PROCESSING);
|
||||
}
|
||||
doRebuild(callback, null, true, compileScope);
|
||||
}
|
||||
|
||||
|
||||
@@ -321,7 +321,9 @@ public class IncProjectBuilder {
|
||||
}
|
||||
else {
|
||||
for (BuildTarget<?> target : projectDescriptor.getBuildTargetIndex().getAllTargets()) {
|
||||
clearOutputFiles(context, target);
|
||||
if (context.getScope().isAffected(target)) {
|
||||
clearOutputFiles(context, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -389,9 +391,11 @@ public class IncProjectBuilder {
|
||||
|
||||
ProjectDescriptor projectDescriptor = context.getProjectDescriptor();
|
||||
for (BuildTarget<?> target : projectDescriptor.getBuildTargetIndex().getAllTargets()) {
|
||||
final Collection<File> outputs = target.getOutputRoots(context);
|
||||
for (File file : outputs) {
|
||||
rootsToDelete.putValue(file, target);
|
||||
if (context.getScope().isAffected(target)) {
|
||||
final Collection<File> outputs = target.getOutputRoots(context);
|
||||
for (File file : outputs) {
|
||||
rootsToDelete.putValue(file, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user