Slackbot
12/13/2022, 4:28 PMVampire
12/13/2022, 6:48 PMDefaultTask
instead (not giving a type) and use the copy { ... }
closure instead. Be sure to still define the inputs and outputs.Leon Linhart
12/14/2022, 12:12 PMcopy
closure. That helped me solve it in the buildscript (although I should probably extract it into a task).
tasks.register('extractCorpus') {
dependsOn(configurations.corpus)
def destinationDir = layout.buildDirectory.dir("corpus")
inputs.files(provider { configurations.corpus })
outputs.dir(destinationDir)
outputs.cacheIf { true }
doLast {
copy {
into(destinationDir)
configurations.corpus.each { file ->
into(file.name.substring(0, file.name.lastIndexOf("."))) {
from(zipTree(file))
}
}
}
}
}