use of com.android.tools.idea.gradle.project.build.invoker.GradleTasksExecutor in project android by JetBrains.
the class GradleSyncInvoker method isBuildInProgress.
private static boolean isBuildInProgress(@NotNull Project project) {
IdeFrame frame = ((WindowManagerEx) WindowManager.getInstance()).findFrameFor(project);
StatusBarEx statusBar = frame == null ? null : (StatusBarEx) frame.getStatusBar();
if (statusBar == null) {
return false;
}
for (Pair<TaskInfo, ProgressIndicator> backgroundProcess : statusBar.getBackgroundProcesses()) {
TaskInfo task = backgroundProcess.getFirst();
if (task instanceof GradleTasksExecutor) {
ProgressIndicator second = backgroundProcess.getSecond();
if (second.isRunning()) {
return true;
}
}
}
return false;
}
Aggregations