GradleRunConfiguration (@NotNull String name) { final RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject); final RunnerAndConfigurationSettings settings = runManager.createConfiguration(name, GradleExternalTaskConfigurationType.class); return (GradleRunConfiguration)settings.getConfiguration(); }