void (@NotNull ExternalSystemTaskId id) { // it is not enough to clean up cache on the start of an external event, because sometimes the changes occur `after` the event finishes. // An example of this behavior is the downloading of gradle distribution: // we must not rely on the caches that were computed without downloaded distribution. if (!(id.getProjectSystemId() == GradleConstants.SYSTEM_ID && id.getType() == ExternalSystemTaskType.RESOLVE_PROJECT)) { return; } Project project = id.findProject(); if (project == null) { return; } GradleInstallationManager installationManager = getInstance(); installationManager.myBuildLayoutParametersCache.remove(getDefaultProjectKey(project)); GradleSettings settings = GradleSettings.getInstance(project); for (GradleProjectSettings linkedSettings : settings.getLinkedProjectsSettings()) { String path = linkedSettings.getExternalProjectPath(); installationManager.myBuildLayoutParametersCache.remove(path); } }