dictionary properties are now calculated in parallel for faster build time
This commit is contained in:
parent
b12c85ecfc
commit
0e8dfbe578
1 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue