mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Allow variables in buildScript{}.
Fixes https://github.com/cbeust/kobalt/issues/340
This commit is contained in:
parent
c90125ede0
commit
204ca452e5
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ class BlockExtractor(val regexp: Pattern, val opening: Char, val closing: Char)
|
|||
var foundClosing = false
|
||||
var count = 0
|
||||
val result = StringBuffer()
|
||||
val topLines = arrayListOf<String>()
|
||||
|
||||
fun updateCount(line: String) {
|
||||
val currentLine = StringBuffer()
|
||||
|
@ -46,8 +47,10 @@ class BlockExtractor(val regexp: Pattern, val opening: Char, val closing: Char)
|
|||
if (found) {
|
||||
foundKeyword = true
|
||||
count = 1
|
||||
result.append(topLines.joinToString("\n"))
|
||||
result.append(line).append("\n")
|
||||
} else {
|
||||
topLines.add(line)
|
||||
updateCount(line)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue