void (@NotNull ExternalSystemTaskId id, @NotNull GradleExecutionSettings settings, @NotNull ExternalSystemTaskNotificationListener listener) { TargetEnvironmentConfigurationProvider provider = ExternalSystemExecutionAware.Companion.getEnvironmentConfigurationProvider(settings); if (provider != null) return; // Prepared by TargetBuildLauncher. RunConfigurationTaskState taskState = settings.getUserData(RunConfigurationTaskState.getKEY()); if (taskState == null) return; LocalTargetEnvironmentRequest request = new LocalTargetEnvironmentRequest(); TargetProgressIndicator progressIndicator = TargetProgressIndicator.EMPTY; try { taskState.prepareTargetEnvironmentRequest(request, progressIndicator); LocalTargetEnvironment environment = request.prepareEnvironment(progressIndicator); String taskStateInitScript = taskState.handleCreatedTargetEnvironment(environment, progressIndicator); if (taskStateInitScript != null) { writeAndAppendScript(settings, taskStateInitScript, "ijtgttaskstate"); } } catch (ExecutionException e) { throw new RuntimeException(e); } listener.onEnvironmentPrepared(id); }