use of com.intellij.flex.model.bc.BuildConfigurationNature in project intellij-plugins by JetBrains.
the class Flexmojos3ImporterTest method testConfiguringCompiledLocalesSpecifiedByDefaultLocale.
public void testConfiguringCompiledLocalesSpecifiedByDefaultLocale() throws Exception {
createProjectSubDirs("src/main/locales/en_US");
importProject(mavenProjectDescription("project", "swf") + "<build>" + " <plugins>" + " <plugin>" + flexmojosPlugin() + "</plugin>" + " </plugins>" + "</build>" + flexFrameworkDependency("3.2.0.3958"));
assertSources("project", "src/main/locales/en_US");
checkBCCount("project", 1);
checkBC("project", "project", new BuildConfigurationNature(Web, false, Application), "", "project-1.0.swf", "target", "3.2.0.3958", "en_US", "target/project-1.0-config-report.xml");
}
use of com.intellij.flex.model.bc.BuildConfigurationNature in project intellij-plugins by JetBrains.
the class FlexScopeTest method testCircularDependency.
public void testCircularDependency() throws Exception {
final Sdk sdk = FlexTestUtils.createSdk(FlexTestUtils.getPathToCompleteFlexSdk("4.6"), null, true);
WriteAction.run(() -> {
final ModifiableModuleModel m1 = ModuleManager.getInstance(myProject).getModifiableModel();
final VirtualFile moduleDir = myProject.getBaseDir().createChildDirectory(this, "module2");
final Module module2 = m1.newModule(moduleDir.getPath(), FlexModuleType.getInstance().getId());
m1.commit();
PsiTestUtil.addSourceRoot(module2, moduleDir);
FlexTestUtils.modifyConfigs(myProject, editor -> {
final ModifiableFlexBuildConfiguration app1 = editor.getConfigurations(myModule)[0];
app1.setName("app1");
FlexTestUtils.setSdk(app1, sdk);
final ModifiableFlexBuildConfiguration lib1 = editor.getConfigurations(module2)[0];
lib1.setNature(new BuildConfigurationNature(TargetPlatform.Web, false, OutputType.Library));
app1.setName("lib1");
FlexTestUtils.setSdk(lib1, sdk);
final ModifiableFlexBuildConfiguration lib2 = editor.createConfiguration(myModule);
lib2.setName("lib2");
lib2.setNature(new BuildConfigurationNature(TargetPlatform.Web, false, OutputType.Library));
FlexTestUtils.setSdk(lib2, sdk);
final ModifiableBuildConfigurationEntry dep1 = editor.createBcEntry(app1.getDependencies(), lib1, null);
app1.getDependencies().getModifiableEntries().add(dep1);
final ModifiableBuildConfigurationEntry dep2 = editor.createBcEntry(lib1.getDependencies(), lib2, null);
lib1.getDependencies().getModifiableEntries().add(dep2);
});
});
doHighlightingTest("");
}
use of com.intellij.flex.model.bc.BuildConfigurationNature in project intellij-plugins by JetBrains.
the class Flexmojos3ImporterTest method testSignAirGoal.
public void testSignAirGoal() throws Exception {
importProject(mavenProjectDescription("project", "swf") + "<build>" + " <sourceDirectory>src/main/flex</sourceDirectory>" + " <plugins>" + " <plugin>" + flexmojosPlugin() + " <executions>\n" + " <execution>\n" + " <goals>\n" + " <goal>sign-air</goal>\n" + " </goals>\n" + " </execution>\n" + " </executions>\n" + " <dependencies>\n" + " <dependency>\n" + " <groupId>com.adobe.flex</groupId>\n" + " <artifactId>compiler</artifactId>\n" + " <version>3.5.0.12683</version>\n" + " <type>pom</type>\n" + " </dependency>\n" + " </dependencies>\n" + " </plugin>" + " </plugins>" + "</build>" + flexFrameworkDependency("3.5.0.12683"));
checkBCCount("project", 1);
final FlexBuildConfiguration bc = checkBC("project", "project", new BuildConfigurationNature(Desktop, false, Application), "", "project-1.0.swf", "target", "3.5.0.12683", "en_US", "target/project-1.0-config-report.xml");
final Module module = ModuleManager.getInstance(myProject).findModuleByName("project");
final String basePath = PathUtil.getParentPath(module.getModuleFilePath());
assertFalse(bc.getAirDesktopPackagingOptions().isUseGeneratedDescriptor());
assertEquals(basePath + "/src/main/resources/descriptor.xml", bc.getAirDesktopPackagingOptions().getCustomDescriptorPath());
assertFalse(bc.getAirDesktopPackagingOptions().getSigningOptions().isUseTempCertificate());
assertEquals(basePath + "/src/main/resources/sign.p12", bc.getAirDesktopPackagingOptions().getSigningOptions().getKeystorePath());
}
use of com.intellij.flex.model.bc.BuildConfigurationNature in project intellij-plugins by JetBrains.
the class Flexmojos3ImporterTest method testDependencyOnJavaIgnored.
public void testDependencyOnJavaIgnored() throws Exception {
createProjectPom(mavenProjectDescription("aggregator", "pom") + " <modules>\n" + " <module>app</module>\n" + " <module>lib1</module>\n" + " <module>lib2</module>\n" + " </modules>\n" + "<build>" + " <plugins>" + " <plugin>" + flexmojosPlugin() + " </plugin>" + " </plugins>" + "</build>" + flexFrameworkDependency("3.2.0.3958"));
createModulePom("app", parent() + mavenProjectDescription("app", "swf") + " <dependencies>\n" + " <dependency>\n" + " <groupId>" + TEST_GROUP_ID + "</groupId>" + " <artifactId>lib1</artifactId>" + " <version>1.0</version>" + " </dependency>\n" + " <dependency>\n" + " <groupId>" + TEST_GROUP_ID + "</groupId>" + " <artifactId>lib1</artifactId>" + " <version>1.0</version>" + " <classifier>test</classifier>" + " <scope>test</scope>" + " </dependency>\n" + " <dependency>\n" + " <groupId>" + TEST_GROUP_ID + "</groupId>" + " <artifactId>lib2</artifactId>" + " <version>1.0</version>" + " </dependency>\n" + " <dependency>\n" + " <groupId>com.adobe.flex.compiler</groupId>\n" + " <artifactId>flex-fontkit</artifactId>\n" + " <version>4.0.0.14159</version>\n" + " <type>jar</type>\n" + " </dependency>\n" + " </dependencies>");
createModulePom("lib1", parent() + " <artifactId>lib1</artifactId>\n" + " <packaging>swc</packaging>");
createModulePom("lib2", parent() + " <artifactId>lib2</artifactId>\n" + " <packaging>jar</packaging>");
importProject();
checkBC("app", "app", new BuildConfigurationNature(Web, false, Application), "", "app-1.0.swf", "target", "3.2.0.3958", "en_US", "target/app-1.0-config-report.xml");
assertModules("aggregator", "app", "lib1", "lib2");
assertModuleType("aggregator", StdModuleTypes.JAVA);
assertModuleType("app", FlexModuleType.getInstance());
assertModuleType("lib1", FlexModuleType.getInstance());
assertModuleType("lib2", StdModuleTypes.JAVA);
checkBCOnBCDependencies("app", "lib1:Merged");
}
use of com.intellij.flex.model.bc.BuildConfigurationNature in project intellij-plugins by JetBrains.
the class Flexmojos3ImporterTest method testConfiguringRuntimeLocalesAsSourceFolders.
public void testConfiguringRuntimeLocalesAsSourceFolders() throws Exception {
createProjectSubDirs("src/main/locales/pt_BR", "src/main/locales/ru_RU");
importProject(mavenProjectDescription("project", "swc") + "<build>" + " <plugins>" + " <plugin>" + flexmojosPlugin() + " <configuration>" + " <runtimeLocales>" + " <locale>pt_BR</locale>" + " <locale>ru_RU</locale>" + " </runtimeLocales>" + " </configuration>" + " </plugin>" + " </plugins>" + "</build>" + flexFrameworkDependency("3.2.0.3958"));
assertSources("project", "src/main/locales/pt_BR", "src/main/locales/ru_RU");
checkBCCount("project", 1);
checkBC("project", "project", new BuildConfigurationNature(Web, false, Library), "", "project-1.0.swc", "target", "3.2.0.3958", "", "target/project-1.0-config-report.xml");
}
Aggregations