diff --git a/app/dictionary-tools.gradle b/app/dictionary-tools.gradle index e1305bdd..bfa04cae 100644 --- a/app/dictionary-tools.gradle +++ b/app/dictionary-tools.gradle @@ -1,6 +1,13 @@ ext.getDictionarySizes = { dictionariesDir, sizesDir -> - fileTree(dir: dictionariesDir).forEach {dictionary -> + fileTree(dir: dictionariesDir).getFiles().parallelStream().forEach {dictionary -> def dictionarySize = dictionary.exists() ? dictionary.text.split("\n").length : 0 new File(sizesDir, "${dictionary.getName()}.size").text = dictionarySize } -} \ No newline at end of file +} + +ext.getDictionaryTimestamps = { dictionariesDir, timestampsDir -> + fileTree(dir: dictionariesDir).getFiles().parallelStream().forEach {dictionary -> + def dictionaryTimestamp = dictionary.exists() ? dictionary.lastModified() : 0 + new File(timestampsDir, "${dictionary.getName()}.timestamp").text = dictionaryTimestamp + } +}