New major version 5.0.0 of gradle-download-task
source link: https://michelkraemer.com/gradle-download-task-5.0.0/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
New major version 5.0.0 of gradle-download-task
Today, I’m happy to announce the new major version 5.0.0 of the popular gradle-download-task. With this Gradle plugin, you can download files in your build scripts and display progress information. The release notes for the new version are rather extensive this time. Highlights include downloading multiple files in parallel, concurrent execution with other build tasks, and better support for Kotlin and Gradle 8 (see full list of changes below). Updating is recommended for all users.
Grab gradle-download-task 5.0.0 while it’s still hot:
https://github.com/michel-kraemer/gradle-download-task
The new version has been tested with Gradle 5.0 up to 7.3.3 but should be compatible to any newer version as well.
New features
- The plugin can now download multiple files in parallel
- Download tasks can now be executed concurrently with other build tasks
- Writing to disk is performed asynchronously (and therefore in parallel to the download)
- The destination file name is displayed in the progress message
- The plugin logs retry attempts
- It retries downloads on any exception but
UnknownHostException
- The
download
andverify
extensions are now compatible with Kotlin and Gradle 8 - Support for lazy evaluation of Kotlin lambdas has been added
- Kotlin example build scripts have been added
Breaking changes
- The plugin now requires Java 8 (or higher) and Gradle 5 (or higher)
- The
authScheme
property has been removed. The plugin is now able to detect the required scheme itself. - Due to incompatibility with Gradle 8, the
download
andverify
extensions now need to be called through theirrun
method. - Further information can be found in the migration guide below
Maintenance
- Integration tests for all Gradle versions up to 7.3.3 have been added
- Gradle has been upgraded to 6.9.1
- Apache HttpClient has been upgraded to 5.1.2
- The tests have been migrated to JUnit 5 and AssertJ
- JaCoCo has been enabled for testkit tests
- JUnit test reports are now uploaded on failure on the CI server
- Functional tests are now executed for all Gradle versions from the build script
Others
- The README file has been improved
- There is a cool new screencast 😎
Migrating from version 4.x to 5.x
gradle-download-task 5.0.0 introduces the following breaking changes:
- The
authScheme
property has been removed. The plugin now automatically detects the correct scheme to use based on the server response. - The
download
extension was incompatible with Gradle 8. Also, using it from Kotlin build scripts was rather inconvenient. It is therefore now necessary to call the extension through itsrun
method. Replacedownload { ... }
withdownload.run { ... }
. The same applies to theverify
extension.
More information
If you want to learn more about the plugin, have a look at its README file or at my earlier post.
I also strongly advice you to read my blog post on 10 recipes for gradle-download-task to get an idea what you can do with the plugin.
Sponsor this project
If you or your company use any of my projects or like what I’m doing, please consider sponsoring me so I can continue maintaining and developing my projects and new ones!
Thank you so much for your support!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK