Giuseppe Barbieri
07/11/2024, 9:08 AMoutputs.file but it doesn't look effective
val downloadZipFile by registering(Download::class) {
src("<https://github.com/mala-project/test-data/archive/refs/heads/main.zip>")
val zip = layout.buildDirectory.file("test-data.zip")
dest(zip)
outputs.file(zip)
}Vampire
07/11/2024, 9:16 AMDownloadVampire
07/11/2024, 9:16 AMGiuseppe Barbieri
07/11/2024, 9:16 AMVampire
07/11/2024, 9:16 AMBy default, the plugin always performs a download even if the destination file already exists. If you want to prevent files from being downloaded again, use theflag (see description below).overwrite
Giuseppe Barbieri
07/11/2024, 9:17 AMNiels Doucet
07/11/2024, 9:25 AMuseETag setting as well. I've successfully used it to avoid repeated downloads.