Do not skip maven compilation if sources contain .kts files but no .kt files

#KT-34006 fixed
This commit is contained in:
Ilya Chernikov
2019-09-25 21:52:00 +02:00
parent c53a805696
commit a1118ce209
@@ -231,7 +231,8 @@ public abstract class KotlinCompileMojoBase<A extends CommonCompilerArguments> e
private boolean hasKotlinFilesInSources() throws MojoExecutionException {
for (File root : getSourceDirs()) {
if (root.exists()) {
boolean sourcesExists = !FileUtil.processFilesRecursively(root, file -> !file.getName().endsWith(".kt"));
boolean sourcesExists =
!FileUtil.processFilesRecursively(root, file -> !file.getName().endsWith(".kt") && !file.getName().endsWith(".kts"));
if (sourcesExists) return true;
}
}