1
0
Fork 0

the search for language files is now 4 times faster, resulting in faster initial start up (or faster opening the Settings screen)

This commit is contained in:
sspanak 2025-02-16 16:39:47 +02:00 committed by Dimo Karaivanov
parent ae619e1f0f
commit c844db1fa1
7 changed files with 180 additions and 157 deletions

View file

@ -0,0 +1,22 @@
ext.mergeDefinitions = { String definitionsInputDir, String definitionsOutputPath ->
def merged = new File(definitionsOutputPath)
merged.delete()
boolean isFirst = true
fileTree(dir: definitionsInputDir).getFiles().each { file ->
if (!file.isFile() || !file.name.endsWith(".yml")) {
return
}
if (isFirst) {
isFirst = false
} else {
merged << "\n---\n"
}
merged << file.text
.replaceAll("\\s*#[^\n]+", "")
.replaceAll("^[ ]+\n", "")
.trim()
}
}