New features in gradle-download-task 3.4.0
The new version 3.4.0 of gradle-download-task, a Gradle plugin providing a
Download task that display progress information, has just been released. It
contains many new features and updating is recommended for all users.
Grab gradle-download-task 3.4.0 while it’s still hot:
The new version has been tested with Gradle 1.x up to 4.6 but should be compatible to any other version as well.
Here’s a short overview of all new features (more details below):
- Add support for ETags
- Register top-level properties
Verifyfor the tasks provided by the plugin
verifyChecksumextension as an alternative to the
- Deprecate Java 6
- Deprecate Gradle 1.x
- Add integrations tests for all Gradle versions up to 4.6
Support for the HTTP ETag header
The plugin can now use the HTTP
ETag header to check if a file has been changed
on the server or not. You can enable this feature through the
flag and the new
useETag flag. If both of them are
true, the plugin will
check a file’s timestamp as well as its entity tag (ETag) and only download it
if it has been modified on the server since the last download. The plugin can
strong and weak ETags.
Possible values for the new
useETag flag are:
Do not use the ETag
Use the ETag but display a warning if it is weak
Use the ETag and do not display a warning if it is weak
Only use the ETag if it is strong
Here’s an example demonstrating how the new flag can be used:
Download to temporary file and move afterwards
One of the most requested features was the possibility to download a file to a
temporary location and, upon successful execution, move it to the final
destination. This behavior can now be enabled with the new
overwrite flag is set to
tempAndMove can be used to avoid
partially downloaded files if Gradle is forcefully closed or the system crashes.
Note that the plugin always deletes partial downloads on connection errors,
regardless of the value of this flag.
The temporary location can be configured through the new
configuration property. The plugin appends the extension
.part to all
The following snippet shows how the new flag can be used:
Avoid unnecessary import statement
In previous versions, it was necessary to import the class
de.undercouch.gradle.tasks.download.Download to use the
Download task. With
the new version 3.4.0, this import statement is not needed anymore. The same
applies to the
Of course, the change is backwards compatible. You do not have to modify existing build scripts.
I also strongly advice to read my blog post on 10 recipes for gradle-download-task to get an idea what you can do with the plugin.
Posted by Michel Krämer
on 4 March 2018
This blog post summarizes the changes that came with the latest bson4jackson
updates. Highlights are support for
Decimal128, refactored serializers and
deserializers, as well as support for Jackson 2.8 and 2.9.
gradle-download-task is a Gradle plugin that allows you to download files during the build process. This post summarizes common patterns and use cases of gradle-download-task and provides useful tips and tricks.
I’ve just released gradle-download-task 5.0.0. The new version now downloads multiple files in parallel, executes concurrently with other build tasks, and offers better support for Kotlin and Gradle 8.
The popular Gradle plugin now supports lazy source and destination properties. You can also configure it to ignore certificate errors, and it provides a new verify task. The plugin uses semantic versioning from now on.