How can I enable Gradle file system watching persistently?

Viewed 2500

Gradle has this new feature that listen to file system events instead of touching the filesystem to detect changes to local files.

It can be enabled on the command line with --watch-fs. How can it be enabled persistently in a file that I would check in source control?

2 Answers

As of today, with Gradle 6.5 you can enable the experimental feature by putting the following in gradle.properties in the project root, or in your ~/.gradle/gradle.properties file:

org.gradle.unsafe.watch-fs=true

The feature will eventually be enabled by default, and the property name will change (losing the unsafe part).

Related