This message was deleted.
# community-support
s
This message was deleted.
v
Maybe make a task of type
DefaultTask
instead (not giving a type) and use the
copy { ... }
closure instead. Be sure to still define the inputs and outputs.
l
Thanks for reminding me of the
copy
closure. That helped me solve it in the buildscript (although I should probably extract it into a task).
Copy code
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))
                }
            }

        }
    }
}
👌 1