days
0
-28
0
hours
-1
0
minutes
-2
-8
seconds
-1
-7
search
Accelerating incremental builds

Gradle 6.5 arrives with a new experimental file-system watching feature

Maika Möbus
gradle 6.5
© Shutterstock / Elzza

Not even a month has passed since the release of Gradle 6.4, and now Gradle 6.5 is here. The open source tool comes with a new file-system watching feature that is still in experimental mode, has a new optional version ordering on board, and fixes 25 issues. Let’s take a closer look.

Gradle 6.5 has been released. The open source build automation system has new features, bug and security fixes and potential breaking changes on board.

SEE ALSO: The trendy five: Creative GitHub repos bring May 2020 flowers

File-system watching

The latest Gradle version introduces file-system watching as an experimental feature. It should accelerate incremental builds by reducing the amount of disk I/O that is needed for checking what has changed since the previous build. File-system watching is described in detail in a blog post as the first post in a series on incremental development.


As it is still in experimental mode, the capabilities of the file-system watching feature are currently still limited, e.g. SUBST and network drives are currently not supported on Windows. Disabled by default, file-system watching can be enabled for either a single build or for all builds:

Run with --watch-fs on the command line

This enables watching the file-system for this build only.

Put org.gradle.unsafe.watch-fs=true in your gradle.properties

This enables watching the file-system for all builds, unless explicitly disabled with --no-watch-fs

Other updates

In Gradle 6.5, users also receive a new option for version ordering as the current algorithm may lead to confusing results. For example, RC is currently considered to be a higher version than SNAPSHOT. With the new opt-in feature, enabled by using enableFeaturePreview("VERSION_ORDERING_V2"), this issue will be resolved. Starting with Gradle 7.0, the new version ordering will be enabled by default.

For users signing artifacts with gpg-agent, the vulnerability that the key passphrase is captured in INFO and DEBUG logs has been discovered in Gradle 4.5 through Gradle 6.4.x. In Gradle 6.5, the issue has now been fixed.

SEE ALSO: Seven Advantages of In-IDE Code Reviews

When upgrading from Gradle 6.4, there are some potential breaking changes to watch out for: Kotlin, Groovy and PMD have been updated to newer versions, and the internal class AbstractTask is now deprecated. See the upgrade guide for more details.

For all that’s new in Gradle 6.5, see the release notes.

Author
Maika Möbus
Maika Möbus has been an editor for Software & Support Media since January 2019. She studied Sociology at Goethe University Frankfurt and Johannes Gutenberg University Mainz.

Leave a Reply

avatar
400