Search in sources :

Example 1 with ModuleExtendedModel

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());
}
Also used : ModuleExtendedModel(org.jetbrains.plugins.gradle.model.ModuleExtendedModel) Test(org.junit.Test)

Example 2 with ModuleExtendedModel

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);
}
Also used : ModuleExtendedModel(org.jetbrains.plugins.gradle.model.ModuleExtendedModel) JavaModuleModel(com.android.tools.idea.gradle.project.model.JavaModuleModel)

Example 3 with ModuleExtendedModel

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);
}
Also used : ModuleExtendedModel(org.jetbrains.plugins.gradle.model.ModuleExtendedModel) JavaModuleModel(com.android.tools.idea.gradle.project.model.JavaModuleModel)

Aggregations

ModuleExtendedModel (org.jetbrains.plugins.gradle.model.ModuleExtendedModel)3 JavaModuleModel (com.android.tools.idea.gradle.project.model.JavaModuleModel)2 Test (org.junit.Test)1