1
0
Fork 0
tt9/app/dictionary-tools.gradle
2024-02-26 10:59:48 +02:00

6 lines
No EOL
274 B
Groovy

ext.getDictionarySizes = { dictionariesDir, sizesDir ->
fileTree(dir: dictionariesDir).forEach {dictionary ->
def dictionarySize = dictionary.exists() ? dictionary.text.split("\n").length : 0
new File(sizesDir, "${dictionary.getName()}.size").text = dictionarySize
}
}