Undercouch Download Gradle Plugin ((hot)) ◉
task downloadFile(type: Download) { src 'https://example.com' dest layout.buildDirectory.file("downloads/assets.zip") overwrite false // Don't download if it already exists } Use code with caution. 2. Downloading Multiple Files
task downloadAll(type: Download) { src([ 'https://example.com', 'https://example.com' ]) dest layout.buildDirectory.dir("images") } Use code with caution. 3. Using the download Extension Inline
task setupEnvironment { doLast { download.run { src 'https://example.com' dest buildDir } println "Configuration downloaded successfully." } } Use code with caution. Advanced Features Handling Authentication undercouch download gradle plugin
The most common use case is creating a dedicated task to fetch a single file.
Displays download progress in the console exactly like Gradle’s internal dependency fetching. task downloadFile(type: Download) { src 'https://example
If you don't want to create a formal task, you can use the download method inside any other task's doLast block.
To get started, add the plugin to your build.gradle or build.gradle.kts file using the Gradle Plugin Portal . plugins { id "de.undercouch.download" version "5.7.0" } Use code with caution. Kotlin DSL: plugins { id("de.undercouch.download") version "5.7.0" } Use code with caution. Core Usage Examples 1. Basic File Download Displays download progress in the console exactly like
Options to skip downloads if the file already exists, saving bandwidth and time. Installation and Setup
Allows you to define sources and destinations that are only calculated at execution time.

