use of org.jetbrains.plugins.gradle.model.ModuleExtendedModel in project intellij-community by JetBrains.
the class ModuleExtendedModelBuilderImplTest method testJavaExtendedModel.
@Test
public void testJavaExtendedModel() throws Exception {
final Map<String, ModuleExtendedModel> modulesMap = getModulesMap(ModuleExtendedModel.class);
assertEquals(3, modulesMap.size());
final ModuleExtendedModel rootModule = modulesMap.get(":");
assertNotNull(rootModule);
assertNull(rootModule.getJavaSourceCompatibility());
final ModuleExtendedModel defaultJavaModule = modulesMap.get(":defaultJavaModule");
assertNotNull(defaultJavaModule);
assertNotNull(defaultJavaModule.getJavaSourceCompatibility());
final ModuleExtendedModel javaModule = modulesMap.get(":javaModule");
assertNotNull(javaModule);
assertEquals("1.6", javaModule.getJavaSourceCompatibility());
}
use of org.jetbrains.plugins.gradle.model.ModuleExtendedModel in project android by JetBrains.
the class ModuleSetup method setUpJavaModule.
private void setUpJavaModule(@NotNull Module module, @NotNull SyncAction.ModuleModels models, @NotNull ProgressIndicator indicator, boolean androidProjectWithoutVariants) {
ModuleExtendedModel javaModel = models.findModel(ModuleExtendedModel.class);
JavaModuleModel javaModuleModel = new JavaModuleModel(models.getModule(), javaModel, androidProjectWithoutVariants);
myJavaModuleSetup.setUpModule(module, myIdeModelsProvider, javaModuleModel, models, indicator);
}
use of org.jetbrains.plugins.gradle.model.ModuleExtendedModel in project android by JetBrains.
the class AndroidGradleProjectResolver method createJavaProject.
private void createJavaProject(@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule, boolean androidProjectWithoutVariants) {
//noinspection deprecation
ModuleExtendedModel model = resolverCtx.getExtraProject(gradleModule, ModuleExtendedModel.class);
JavaModuleModel javaModuleModel = new JavaModuleModel(gradleModule, model, androidProjectWithoutVariants);
ideModule.createChild(JAVA_MODULE_MODEL, javaModuleModel);
}
Aggregations