[GRADLE-2384] MarkupBuilder resolves labels as properties Created: 13/Jul/12 Updated: 04/Jan/13 Resolved: 14/Jul/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Björn Kautler | Assignee: | Unassigned |
Resolution: | Not A Bug | Votes: | 0 |
Description |
When executing the task task test << { file('test').withWriter { new groovy.xml.MarkupBuilder(it).root { properties() } } } with Gradle 1.0, I get the message
This happens because when the "properties" is handled, the properties of the "test" task are retrieved. During this, getValue() for all the properties is called which gives the message for "dynamicObjectHelper" property. |
Comments |
Comment by Adam Murdoch [ 14/Jul/12 ] |
This is a side effect of how Groovy works: 1. When Groovy evaluates 'properties()', it first looks for a method 'properties()' on the closure containing the call. It does not find one. So, the problem is happening in step 2. There are a few options you have: 1. Use 'delegate.properties()' in the closure |
Comment by Björn Kautler [ 16/Jul/12 ] |
Ah, I see. I used the first solution and now the warning is gone, thanks. |