use of com.android.tools.idea.gradle.project.facet.ndk.NdkFacetType in project android by JetBrains.
the class NdkFacetModuleSetupStep method doSetUpModule.
@Override
protected void doSetUpModule(@NotNull Module module, @NotNull IdeModifiableModelsProvider ideModelsProvider, @NotNull NdkModuleModel ndkModuleModel, @Nullable SyncAction.ModuleModels gradleModels, @Nullable ProgressIndicator indicator) {
NdkFacet facet = findFacet(module, ideModelsProvider, NdkFacet.getFacetTypeId());
if (facet != null) {
configureFacet(facet, ndkModuleModel);
} else {
// Module does not have Native Android facet. Create one and add it.
ModifiableFacetModel model = ideModelsProvider.getModifiableFacetModel(module);
NdkFacetType facetType = NdkFacet.getFacetType();
facet = facetType.createFacet(module, NdkFacet.getFacetName(), facetType.createDefaultConfiguration(), null);
model.addFacet(facet);
configureFacet(facet, ndkModuleModel);
}
}
use of com.android.tools.idea.gradle.project.facet.ndk.NdkFacetType in project android by JetBrains.
the class ContentRootsModuleSetupStepTest method addNativeAndroidFacet.
@NotNull
private NdkFacet addNativeAndroidFacet(@NotNull IdeModifiableModelsProvider modelsProvider) {
Module module = getModule();
ModifiableFacetModel model = modelsProvider.getModifiableFacetModel(module);
NdkFacetType facetType = NdkFacet.getFacetType();
NdkFacet facet = facetType.createFacet(module, NdkFacet.getFacetName(), facetType.createDefaultConfiguration(), null);
model.addFacet(facet);
return facet;
}
Aggregations