days
-1
-2
hours
0
-5
minutes
-2
-2
seconds
-3
-6
search
Major updates and fixes

Gradle 5.1 arrives with a long list of improvements in tow

Eirini-Eleni Papadopoulou
gradle
© Shutterstock / IVANCHINA ANNA  

Gradle is back with another release featuring a long list of updates, improvements, and fixes. From improvements for plugin authors to enhanced tooling API, this release features a lot of goodies!

The Gradle team welcomes 2019 with a new release stuffed with major updates and improvements, as well as a huge list of fixes.

Let’s have a quick look at the highlights of the features in this release, plus a couple of deprecations.

All the updates

Repository to dependency matching – It is now possible to match repositories to dependencies so that Gradle doesn’t search for a dependency in a repository if it’s never going to be found there. This filtering can also be used to separate snapshot repositories from release repositories.

Filter tasks with --group Instead of listing all available tasks, gradle tasks can now show only the tasks belonging to a particular group. This makes it easier to find tasks in builds with many available tasks.

Declaring target architectures for C++ plugins – It’s now possible to target multiple architectures when building C++ projects using the targetMachines property.

Improvements for plugin authors – There are several improvements featured in this release including:

  • Stricter validation with validateTaskProperties
  • Apply plugins from included build using plugins { } block
  • Conveniences for Map properties
  • Specify a convention for a property
  • Use @Option on a task property of type Property<T>

Check out all the improvements here.

Tooling API: Enhanced/additional progress events – Tooling API types reported as part of ProgressEvents to registered ProgressListeners have been enhanced to include additional information. Check them out here.

Gradle 5.1 also features an extensive list of 30 fixed issues.

Keep in mind that there are a couple of deprecations in Gradle 5.1, namely setters for classes and classpath on ValidateTaskProperties. There should not be setters for lazy properties like ConfigurableFileCollections but you can use setFrom instead.

Getting started

Head over to the Gradle 5.x upgrade guide to learn about breaking changes and considerations for upgrading from Gradle 5.0. Keep in mind that if you’re upgrading from Gradle 4.x, you should read the guide for upgrading from Gradle 4.x to 5.0 first.

Author
Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou is an editor for JAXenter.com. Just finished her masters in Modern East Asian Studies and plans to continue with her old hobby that is computer science.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of