stevesaliman / gradle-properties-plugin

Gradle plugin to simplify loading project properties from external environment specific files
Apache License 2.0
192 stars 28 forks source link

Wrong docu #7

Closed Vampire closed 10 years ago

Vampire commented 10 years ago

"More formally, the plugin applies project and environment files, when found, from the root project down to the plugin that applies the plugin" in the README.md should probably be "More formally, the plugin applies project and environment files, when found, from the root project down to the project that applies the plugin"

"It makes life easier for developers who are new to a project to configure and build a because properties for multiple environments can be stored with the project itself, reducing the number of external magic that needs to happen for a project to run." also is wrong, an "a" too much and probably a comma too less.

"It it makes life easier for experienced developers to create different configurations for different scenarios on their boxes." also, an "it" too much.

While you can do it, you usually do not use .ext explicitly to retrieve or modify a property on a project in Gradle. In your example you use "tokens: project.ext.filterTokens" but Gradle-style would be to just use "tokens: project.filterTokens". You only need to use project.ext. to add a new property to the project. So doing "project.foo = 'bar'" will complain that foo does not exist, "project.ext.foo = 'bar'; project.foo = 'baz'" works fine and just "project.foo" to retrieve the value or null if it does not exist always works properly. So I'd suggest to not use ".ext" in the example. :-)

(and you usually use "doLast()" or "<<" to add a task action for execution phase, except you need to add an action to the beginning of a task that already exists.)

And "compileJava.dependsOn << "prep"" should probably just be "compileJava.dependsOn prep", no need for "<<" or the quotes :-)

"ir the application might be able to get it from a system file." should be "or the application might be able to get it from a system file."

"to match a property in one of the 5 standard locations defined earlier" actually it is nine locations currently. Maybe it is best to just omit the number here :-)

"There are a few ways to change the Gradle user home directory. The properties plugin uses a gradle property to use a different user home directory. The properties plugin uses the same property, but I haven't done much testing of that yet." The properties plugin uses the same property as itself? I guess this should say something else.

"When the properties plugin is applied, three things happen. First, the plugin processes the various property files as described above." Not only property files are processed, but also environment variables, system propeties and commandline parameters, maybe this should be noted, otherwise it may confuse the reader. :-)