void (@NotNull ProjectId projectId, @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull BuildScriptDataBuilder buildScriptData) { String pluginVersion = PropertiesComponent.getInstance().getValue(LATEST_GRADLE_VERSION_KEY, FALLBACK_VERSION); ApplicationInfo applicationInfo = ApplicationInfo.getInstance(); String ideVersion; if (applicationInfo.isEAP()) { BuildNumber build = applicationInfo.getBuild(); ideVersion = build.isSnapshot() ? build.getBaselineVersion() + "-SNAPSHOT" : build.asStringWithoutProductCode(); } else { ideVersion = applicationInfo.getFullVersion(); } configureBuildScript(buildScriptData, pluginVersion, ideVersion); VirtualFile contentRoot = ArrayUtil.getFirstElement(rootModel.getContentRoots()); if (contentRoot == null) return; if (!createPluginXml(projectId, module, contentRoot.getPath())) return; StartupManager.getInstance(module.getProject()).runWhenProjectIsInitialized(() -> { FileEditorManager.getInstance(module.getProject()).openFile(buildScriptData.getBuildScriptFile(), true); createRunConfiguration(module, contentRoot.getPath()); }); }