Documentation Update: setting system properties via gradle.properties in a multi project build


(Olaf Groeger) #1

It might be obvious for experienced gradle users but for a new user the documentation regarding the usage of gradle.properties files in a multi project build might miss a note when it comes to system properties:

In chapter 14.2, 2nd paragraph is explained that in a multi project build a gradle.properties file can be located in every sub project. In the 4th paragraph is explained that it is possible to set system properties using a gradle.properties file.

When you combine the informations from the two paragraphs the impression evolves that you can set system properties in a sub project gradle.properties file what does not work. A system property can only be set in the “root” gradle.properties. Any attempt to set it in a sub project gradle.properties file is ignored. I suggest to add one sentence to the docu chapter 14.2 fourth paragraph to make this more clear, e.g. “For multi-project builds this must be done in the root gradle.properties file because this information can not be passed to sub projects”.


(Luke Daley) #2

Hi Olaf,

Thanks for the suggestion. I’ve just made the change.

https://github.com/gradle/gradle/commit/534756a8e3edc7d63a2957444f2c15651354d997


(Olaf Groeger) #3

Great. I like it!