use of com.android.tools.idea.gradle.project.facet.java.JavaFacetConfiguration in project android by JetBrains.
the class JavaFacetModuleSetupStep method doSetUpModule.
@Override
protected void doSetUpModule(@NotNull Module module, @NotNull IdeModifiableModelsProvider ideModelsProvider, @NotNull JavaModuleModel javaModuleModel, @Nullable SyncAction.ModuleModels gradleModels, @Nullable ProgressIndicator indicator) {
JavaFacet facet = setAndGetJavaGradleFacet(module, ideModelsProvider);
GradleFacet gradleFacet = findFacet(module, ideModelsProvider, GradleFacet.getFacetTypeId());
if (gradleFacet != null) {
// This is an actual Gradle module, because it has the GradleFacet. Top-level modules in a multi-module project usually don't
// have this facet.
facet.setJavaModuleModel(javaModuleModel);
}
File buildFolderPath = javaModuleModel.getBuildFolderPath();
JavaFacetConfiguration facetProperties = facet.getConfiguration();
facetProperties.BUILD_FOLDER_PATH = buildFolderPath != null ? toSystemIndependentName(buildFolderPath.getPath()) : "";
facetProperties.BUILDABLE = javaModuleModel.isBuildable();
}
use of com.android.tools.idea.gradle.project.facet.java.JavaFacetConfiguration in project android by JetBrains.
the class JavaFacetModuleSetupStepTest method verifyFacetConfiguration.
private static void verifyFacetConfiguration(@NotNull JavaFacet facet, @NotNull JavaModuleModel javaModel, @NotNull File buildFolderPath, boolean buildable) {
assertSame(javaModel, facet.getJavaModuleModel());
JavaFacetConfiguration configuration = facet.getConfiguration();
assertEquals(toSystemIndependentName(buildFolderPath.getPath()), configuration.BUILD_FOLDER_PATH);
assertEquals(buildable, configuration.BUILDABLE);
verify(javaModel).getBuildFolderPath();
verify(javaModel).isBuildable();
}
Aggregations