use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method compileModuleFromSourceFolder.
private void compileModuleFromSourceFolder(String module, String srcFolder, String outFolder, String... repos) {
List<String> options = new LinkedList<String>();
options.add("-src");
options.add(getPackagePath() + "/modules/" + srcFolder);
if (outFolder != null) {
options.add("-out");
options.add(outFolder);
} else {
options.addAll(defaultOptions);
}
for (String repo : repos) {
options.add("-rep");
options.add(repo);
}
CeyloncTaskImpl task = getCompilerTask(options, null, Arrays.asList(module));
Boolean ret = task.call();
assertTrue(ret);
}
use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlJarDependency.
@Test
public void testMdlJarDependency() throws IOException {
// compile our java class
File classesOutputFolder = new File(destDir + "-jar-classes");
cleanCars(classesOutputFolder.getPath());
classesOutputFolder.mkdirs();
File jarOutputFolder = new File(destDir + "-jar");
cleanCars(jarOutputFolder.getPath());
jarOutputFolder.mkdirs();
compileJavaModule(jarOutputFolder, classesOutputFolder, moduleName + ".modules.jarDependency.java", "1.0", moduleName.replace('.', '/') + "/modules/jarDependency/java/JavaDependency.java");
// Try to compile the ceylon module
CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", jarOutputFolder.getPath()), (DiagnosticListener<? super FileObject>) null, "modules/jarDependency/ceylon/module.ceylon", "modules/jarDependency/ceylon/Foo.ceylon");
assertEquals(Boolean.TRUE, ceylonTask.call());
}
use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlAetherMissingDependencies2.
@Test
public void testMdlAetherMissingDependencies2() throws IOException {
// Try to compile the ceylon module
CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", "aether"), "modules/bug1104/module.ceylon", "modules/bug1104/test.ceylon");
assertEquals("Compilation failed", Boolean.TRUE, ceylonTask.call());
}
Aggregations