Configuring the Build Environment says the following:
The configuration is applied in following order (in case an option is configured in multiple locations the last one wins): > * from gradle.properties located in gradle user home. > * from gradle.properties located in project build dir. > * from system properties, e.g. when -Dsome.property is used in the command line.
The build dir should be listed before the user home.
(Chapter 14 gets it right: “The properties file in the user’s home directory has precedence over property files in the project directories.”)