mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jps cache] Forcibly cleanup compilation output folder at Force Update JPS Caches
GitOrigin-RevId: 91c92c344e15d44b63d7616a0fef5390b952f581
This commit is contained in:
committed by
intellij-monorepo-bot
parent
027958e07b
commit
e4f3f6d93a
@@ -38,7 +38,7 @@
|
||||
<action id="JpsUpdateCachesAction" class="com.intellij.jps.cache.action.JpsUpdateCachesAction" text="Update JPS Caches">
|
||||
<add-to-group group-id="BuildMenu" anchor="last"/>
|
||||
</action>
|
||||
<action id="JpsForceUpdateCachesAction" class="com.intellij.jps.cache.action.JpsForceUpdateCachesAction" text="Force Update JPS Caches" internal="true">
|
||||
<action id="JpsForceUpdateCachesAction" class="com.intellij.jps.cache.action.JpsForceUpdateCachesAction" text="Force Update JPS Caches">
|
||||
<add-to-group group-id="BuildMenu" anchor="last"/>
|
||||
</action>
|
||||
</actions>
|
||||
|
||||
+10
-1
@@ -37,6 +37,7 @@ import org.jetbrains.jps.model.serialization.JpsLoaderBase;
|
||||
import org.jetbrains.jps.model.serialization.PathMacroUtil;
|
||||
import org.jetbrains.jps.util.JpsPathUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
@@ -90,7 +91,15 @@ public class JpsOutputLoaderManager implements Disposable {
|
||||
Pair<String, Integer> commitInfo = getNearestCommit(isForceUpdate);
|
||||
if (commitInfo != null) {
|
||||
// Drop JPS metadata to force plugin for downloading all compilation outputs
|
||||
if (isForceUpdate) myMetadataLoader.dropCurrentProjectMetadata();
|
||||
if (isForceUpdate) {
|
||||
myMetadataLoader.dropCurrentProjectMetadata();
|
||||
File outDir = new File(myBuildOutDir);
|
||||
if (outDir.exists()) {
|
||||
indicator.setText("Clean output directories");
|
||||
FileUtil.delete(outDir);
|
||||
}
|
||||
LOG.info("Compilation output folder empty");
|
||||
}
|
||||
startLoadingForCommit(commitInfo.first);
|
||||
}
|
||||
hasRunningTask.set(false);
|
||||
|
||||
Reference in New Issue
Block a user