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

BuildParser fix.

This commit is contained in:
Cedric Beust 2017-03-09 13:32:10 -08:00
parent 5ea2fe30b0
commit 87c56d320e

View file

@ -60,8 +60,10 @@ class BlockExtractor(val regexp: Pattern, val opening: Char, val closing: Char)
result.append(line).append("\n")
} else {
val allowedImports = listOf("com.beust", "java")
val disallowedImports = listOf("com.beust.kobalt.plugin")
if (! line.startsWith("import") ||
(line.startsWith("import") && allowedImports.any { line.contains(it) })) {
(line.startsWith("import") && allowedImports.any { line.contains(it) }
&& ! disallowedImports.any { line.contains(it) })) {
topLines.add(line)
}
updateCount(line)