[GRADLE-496] dependsOn behavior - Improvement for user's guide Created: 22/May/09 Updated: 04/Jan/13 Resolved: 28/May/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.6 |
Fix Version/s: | 0.6.1 |
Type: | Improvement | ||
Reporter: | Tomek Kaczanowski | Assignee: | Hans Dockter |
Resolution: | Fixed | Votes: | 0 |
Attachments: | build.gradle build_updated.gradle dependency_on_non_defined_tasks.diff |
Description |
Hi, I have come across this bug when trying to reference many not-yet-defined tasks with square brackets syntax. Looks like the behaviour of dependsOn with apostrophes and square brackets is inconsistent if depending on not yet defined tasks. In short, it works fine with '' but crashes with [] example build (see attachment) // THIS WORKS FINE // THE LINE BELOW CRASHES THE BUILD task taskA { tomek@tomek-desktop:~$ gradle -t Build failed with an exception. Build file '/home/tomek/build.gradle' line: 5 A problem occurred evaluating root project 'tomek'. BUILD FAILED if line If this line – |
Comments |
Comment by Tomek Kaczanowski [ 22/May/09 ] |
the problem is there, but not exactly where I thought it is it looks like this. If taskA is not yet defined, you can create tasks that depends on it using its name in apostrophes, like this task depA (dependsOn: 'taskA') but you cant refer to it without apostrophes I don't know if it's a bug or a feature but surely it is not explained in the user guide. – |
Comment by Tomek Kaczanowski [ 27/May/09 ] |
Ok, so as I've found it in documentation - it is stated clearly (in some other place) that this is an expected behaviour. I'd suggest to add one sentence to the section that shows how to add dependency to a task that is not yet defined to make things perfectly clear: "Please notice, that you can't use a shortcut notation (see Section 4.6, "Shortcut notations") when referring to task, which is not defined yet." patch included |
Comment by Tomek Kaczanowski [ 27/May/09 ] |
documentation patch |