use of com.liferay.ide.gradle.core.LiferayGradleProject in project liferay-ide by liferay.
the class GradleProjectTests method getSymbolicName.
@Test
public void getSymbolicName() throws Exception {
LiferayGradleProject gradleProject = Util.fullImportGradleProject("projects/getSymbolicName");
assertNotNull(gradleProject);
NullProgressMonitor monitor = new NullProgressMonitor();
IPath outputJar = gradleProject.getOutputBundle(false, monitor);
if (outputJar != null && outputJar.toFile().exists()) {
outputJar = gradleProject.getOutputBundle(true, monitor);
}
assertTrue(outputJar.toFile().exists());
assertEquals("com.liferay.test.bsn", gradleProject.getSymbolicName());
}
use of com.liferay.ide.gradle.core.LiferayGradleProject in project liferay-ide by liferay.
the class GradleProjectTests method toolingApiCustomModel.
@Test
public void toolingApiCustomModel() throws Exception {
LiferayGradleProject gradleProject = Util.fullImportGradleProject("projects/customModel");
assertNotNull(gradleProject);
CustomModel customModel = GradleCore.getToolingModel(CustomModel.class, gradleProject.getProject());
assertNotNull(customModel);
assertFalse(customModel.hasPlugin("not.a.plugin"));
assertTrue(customModel.hasPlugin("org.dm.gradle.plugins.bundle.BundlePlugin"));
}
use of com.liferay.ide.gradle.core.LiferayGradleProject in project liferay-ide by liferay.
the class ImportWorkspaceProjectTests method testImportLiferayWorkspaceEE.
@Test
public void testImportLiferayWorkspaceEE() throws Exception {
LiferayGradleProject eeProject = Util.fullImportGradleProject("projects/liferay-workspace-ee");
assertNotNull(eeProject);
Util.waitForBuildAndValidation();
assertNotLiferayProject("liferay-workspace-ee");
assertNotLiferayProject("aws");
assertNotLiferayProject("docker");
assertNotLiferayProject("jenkins");
}
use of com.liferay.ide.gradle.core.LiferayGradleProject in project liferay-ide by liferay.
the class ImportWorkspaceProjectTests method testImportLiferayWorkspace.
@Test
public void testImportLiferayWorkspace() throws Exception {
LiferayGradleProject rootProject = Util.fullImportGradleProject("projects/testWorkspace");
assertNotNull(rootProject);
Util.waitForBuildAndValidation();
assertLiferayProject("jstl.test");
assertLiferayProject("roster-api");
assertLiferayProject("roster-service");
assertLiferayProject("roster-web");
assertLiferayProject("sample-portlet");
assertLiferayProject("sample-model-listener");
assertLiferayProject("sample-theme");
assertSourceFolders("sample-theme", "src");
}
use of com.liferay.ide.gradle.core.LiferayGradleProject in project liferay-ide by liferay.
the class Util method fullImportGradleProject.
public static LiferayGradleProject fullImportGradleProject(String projectPath) throws Exception {
IWorkspace ws = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = ws.getRoot();
File src = new File(projectPath);
File dst = new File(root.getLocation().toFile(), src.getName());
TestUtil.copyDir(src, dst);
IProgressMonitor monitor = new NullProgressMonitor();
IStatus status = GradleUtil.importGradleProject(dst, monitor);
Util.waitForBuildAndValidation();
if (status.isOK()) {
IProject project = CoreUtil.getProject(dst.getName());
return new LiferayGradleProject(project);
} else {
throw new Exception(status.getException());
}
}
Aggregations