1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Don't compile tests when there are none.

This commit is contained in:
Cedric Beust 2015-10-14 20:45:41 -07:00
parent f87a1f5164
commit 1a329dbd52

View file

@ -126,10 +126,17 @@ public class JavaPlugin @Inject constructor(
{ it: String -> it.endsWith(".java") }
.map { File(projectDir, it).absolutePath }
return compilePrivate(project,
testDependencies(project),
absoluteSourceFiles,
makeOutputTestDir(project))
val result =
if (absoluteSourceFiles.size() > 0) {
compilePrivate(project,
testDependencies(project),
absoluteSourceFiles,
makeOutputTestDir(project))
} else {
// No files to compile
TaskResult()
}
return result
}
}