Version 5.1 of the Gradle build tool for Java and Android development has arrived, with capabilities for dependency matching and configuration-avoidance APIs.
Released January 2, 2019, the upgrade enables matching of repositories to dependencies. With this capability, Gradle will not search for a dependency in a repository if it is not there. For configuration avoidance, meanwhile, a new API for creating and configuring
Task instances allows Gradle to avoid creating tasks that do not need to be executed. The Gradle team recommends that developers use this API when working with tasks in plug-ins. Besides these two capabilities, other features in Gradle 5.1 include:
- Gradle Kotlin DSL 1.1, bringing Kotlin 1.3.11 support for Kotlin lambdas in Gradle APIs as well as fixes and enhancements to improve behavior in IntelliJ IDE script dependency resolution.
- A capability for targeting multiple architectures when building C++ projects using the
- Improvements for plug-in authors, including stricter validation with
validateTaskPropertiesand conveniences for
- To make it easier to find tasks in builds with many available tasks,
gradle tasksnow can only show tasks belonging to a particular group.
- Tooling API types reported as part of
ProgressListenersgain some enhancements. For example,
TaskOperatorDescriptornow includes the identifier of the plug-in registering the task and its dependencies.