Setting the daemon trust store from


I would like to include a custom cacerts file in a repository, and then automatically point the Gradle daemon to this file using, e.g.:

# in project root

This works ok if the daemon gets started from the project root. However, if it accidentally gets started from a subdir/subproject (e.g. click on subproject build in IDE in the morning, after the daemon has stopped), I get a file not found error, because the path is not absolute. However, I don’t want to use an absolute path there, but a path relative to the project root. Is there a way to do this? I understand that gradle.propertiesis just a text file, but maybe there is an existing environment variable I can use, e.g. ${PROJECT_ROOT}/cacerts? Is there some other place to put daemon arguments?

My goal is to make this as seamless as possible for people that don’t know Gradle, ideally using only settings committed in git, without instructions such as “define this or that environment variable on import”.