[GRADLE-1331] Forbid use of labels in build scripts Created: 21/Jan/11 Updated: 04/Jan/13 Resolved: 08/May/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.9.1 |
Fix Version/s: | 1.1-rc-1 |
Type: | New Feature | ||
Reporter: | Peter Niederwieser | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Description |
It seems to be a common mistake to write "foo: bar" instead of "foo = bar" in build scripts. For example: compile("junit:junit:4.8.2") { transitive: false // should be: transitive = false } Since Groovy interprets "transitive:" as a label, it won't complain and the error will be hard to find. People are used to the "foo: bar" syntax because Gradle makes heavy use of named parameters. To avoid this trap, we could write an AST transform that forbids the use of labels in build scripts. |