Gradle 6.5, the latest version of the popular JVM-based build management tool, has been introduced with an experimental file system watching capability designed to improve build times. This new feature allows Gradle to monitor the file system more efficiently, reducing the need for frequent disk I/O operations during builds. With file system watching enabled, Gradle can keep track of changes in the file system in memory between builds rather than polling the system on each build, which significantly speeds up the build process.
To take advantage of this optimization, users can enable file system watching by using the --watch-fs
parameter on the command line. This feature is currently experimental and is expected to become the default in a future Gradle release. However, there are some limitations to be aware of, such as a lack of performance benefits for locations with symlinks and a lack of support for SUBST and network drives on Windows.
In addition to file system watching, Gradle 6.5 introduces improved version dependency ordering. This enhancement addresses issues related to an algorithm that could produce potentially confusing results. The improved ordering is an opt-in feature, allowing developers to benefit from more predictable and reliable dependency resolution in their projects.
Security is also a focus in this release, with a fix for CVE-2020-13165, which impacted signed artifacts. This fix ensures that developers can continue to use Gradle securely in their build processes without the risk of this vulnerability affecting their projects.
Documentation improvements are another highlight of Gradle 6.5. New samples have been added to cover use cases such as safely using credentials in a build and developing local changes in two independent projects with a composite build. These enhancements make it easier for developers to find relevant information and best practices for using Gradle in their projects.
For plug-in authors, Gradle now supports using org.gradle.api.Provider
when adding dependencies. This addition is useful for supplying different dependencies based on user-provided configurations, offering greater flexibility and control in the build process.
Tool providers and IDE developers also benefit from Gradle 6.5, as IDEs can now use a new method from GradleConnector
to asynchronously shut down Gradle daemons. This feature helps manage system resources more effectively by ensuring that daemons do not continue to use memory and other resources unnecessarily.
Gradle is widely recognized as the official build tool for Android mobile applications, but its capabilities extend beyond Android development. It is a general-purpose build tool that can be used for projects based on JVM languages such as Java and Kotlin, as well as non-JVM languages like C++, Python, and Swift. This versatility makes Gradle a powerful tool for a wide range of software development projects