use of com.android.tools.idea.gradle.project.facet.gradle.GradleFacetType in project android by JetBrains.
the class GradleModuleSetup method setUpModule.
public void setUpModule(@NotNull Module module, @NotNull IdeModifiableModelsProvider ideModelsProvider, @NotNull GradleModuleModel model) {
GradleFacet facet = findFacet(module, ideModelsProvider, GradleFacet.getFacetTypeId());
if (facet == null) {
ModifiableFacetModel facetModel = ideModelsProvider.getModifiableFacetModel(module);
GradleFacetType facetType = GradleFacet.getFacetType();
facet = facetType.createFacet(module, GradleFacet.getFacetName(), facetType.createDefaultConfiguration(), null);
facetModel.addFacet(facet);
}
facet.setGradleModuleModel(model);
String gradleVersion = model.getGradleVersion();
GradleSyncSummary syncReport = GradleSyncState.getInstance(module.getProject()).getSummary();
if (isNotEmpty(gradleVersion) && syncReport.getGradleVersion() == null) {
syncReport.setGradleVersion(GradleVersion.parse(gradleVersion));
}
}
Aggregations