void (@NotNull ExternalSystemTaskId id, @NotNull String projectPath, @NotNull GradleExecutionSettings settings, @Nullable GradleVersion gradleVersion, @NotNull ExternalSystemTaskNotificationListener listener, @NotNull CancellationToken cancellationToken) { if (!settings.getDistributionType().isWrapped()) { return; } if (settings.getDistributionType() == DistributionType.DEFAULT_WRAPPED && GradleUtil.findDefaultWrapperPropertiesFile(projectPath) != null) { return; } withGradleConnection(projectPath, id, settings, listener, cancellationToken, connection -> { ensureInstalledWrapper(id, projectPath, settings, gradleVersion, listener, connection, cancellationToken); return null; }); }