void (@NotNull String errorMessage, @Nullable String errorDetails) { context.error("Gradle resolve failed for: " + settings.getExternalProjectPath() + ":" + errorMessage + ":" + errorDetails, getLine()); synchronized (projectsWithResolveErrors) { if (projectsWithResolveErrors.length() != 0) { projectsWithResolveErrors.append(", "); } projectsWithResolveErrors.append(String.format("'%s'", new File(settings.getExternalProjectPath()).getName())); } defaultCallback.onFailure(errorMessage, errorDetails); if (gradleProjectsToRefreshCount.decrementAndGet() == 0) { ApplicationManager.getApplication().invokeLater(() -> promise.setError(projectsWithResolveErrors.toString())); callback.reject("Gradle sync failed"); } }