'full' and 'lite' flavors
This commit is contained in:
parent
11e042e707
commit
6670bccc50
16 changed files with 182 additions and 64 deletions
|
|
@ -1,13 +1,9 @@
|
|||
ext.getDictionarySizes = { dictionariesDir, sizesDir ->
|
||||
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.getDictionaryHashes = { dictionariesDir, timestampsDir ->
|
||||
ext.getDictionaryProperties = { dictionariesDir, sizesDir ->
|
||||
fileTree(dir: dictionariesDir).getFiles().parallelStream().forEach {dictionary ->
|
||||
def hash = dictionary.exists() ? dictionary.text.digest("SHA-1") : ""
|
||||
new File(timestampsDir, "${dictionary.getName()}.hash").text = hash
|
||||
def revision = dictionary.exists() ? exec("git log --pretty=tformat:%H -n 1 ${dictionary}") : ""
|
||||
def words = dictionary.exists() ? dictionary.text.split("\n").length : 0
|
||||
|
||||
new File(sizesDir, "${dictionary.getName()}.props.yml").text = "hash: ${hash}\nrevision: ${revision}\nwords: ${words}"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue