void (@NotNull BuildRunner buildRunner, boolean isForceUpdate, @NotNull List<CmdlineRemoteProto.Message.ControllerMessage.ParametersMessage.TargetTypeBuildScope> scopes, @NotNull Runnable beforeDownload) { if (!canRunNewLoading()) return; if (isCleanupAsynchronously) JpsCachesLoaderUtil.runCleanUpAsynchronously(); if (isForceCachesDownload || isDownloadQuickerThanLocalBuild(buildRunner, myCommitsCountBetweenCompilation, scopes)) { LOG.info("Before download task execution..."); beforeDownload.run(); // Drop JPS metadata to force plugin for downloading all compilation outputs myNettyClient.sendDescriptionStatusMessage(JpsBuildBundle.message("progress.text.fetching.cache.for.commit", myCommitHash)); if (isForceUpdate) { myMetadataLoader.dropCurrentProjectMetadata(); File outDir = new File(myBuildOutDir); if (outDir.exists()) { LOG.info("Start removing old caches before downloading"); myNettyClient.sendDescriptionStatusMessage(JpsBuildBundle.message("progress.text.removing.old.caches")); JpsCachesLoaderUtil.delete(outDir, isCleanupAsynchronously); } LOG.info("Compilation output folder empty"); } startLoadingForCommit(myCommitHash); } else { String message = JpsBuildBundle.message("progress.text.local.build.is.quicker"); LOG.warn(message); myNettyClient.sendDescriptionStatusMessage(message); } hasRunningTask.set(false); }