kotlinc-js, kotlinc-jvm: report error on empty sources

This commit is contained in:
Michael Nedzelsky
2015-06-11 01:01:05 +03:00
parent 3ac1bdcdc8
commit 57356e29b8
3 changed files with 55 additions and 32 deletions
@@ -73,7 +73,11 @@ public class MockLibraryUtil {
File contentDir = JetTestUtils.tmpDir("testLibrary-" + jarName);
File classesDir = new File(contentDir, "classes");
compileKotlin(sourcesPath, classesDir, extraClasspath);
List<File> kotlinFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.kt"), new File(sourcesPath));
if (!kotlinFiles.isEmpty()) {
compileKotlin(sourcesPath, classesDir, extraClasspath);
}
List<File> javaFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.java"), new File(sourcesPath));
if (!javaFiles.isEmpty()) {