mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Faster.
This commit is contained in:
parent
e675034d74
commit
c6561d92eb
1 changed files with 4 additions and 5 deletions
|
@ -129,16 +129,15 @@ class CompilerUtils @Inject constructor(val files: KFiles,
|
|||
|
||||
fun containsJavaFiles(dir: File) : Boolean {
|
||||
if (dir.isDirectory) {
|
||||
var hasJava = false
|
||||
val directories = arrayListOf<File>()
|
||||
dir.listFiles().forEach {
|
||||
hasJava = it.isFile && it.name.endsWith("java")
|
||||
if (it.isFile && it.name.endsWith("java")) return true
|
||||
if (it.isDirectory) directories.add(it)
|
||||
}
|
||||
if (hasJava) return true
|
||||
else return directories.any { containsJavaFiles(it) }
|
||||
return directories.any { containsJavaFiles(it) }
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
if (sourceSuffixes.any { it.contains("kt")}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue