Gradle 5.1 arrives with a long list of improvements in tow

Share
  • January 3, 2019

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

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.

The post Gradle 5.1 arrives with a long list of improvements in tow appeared first on JAXenter.

Source : JAXenter