[GRADLE-1524] Cannot call method from buildscript { } closure Created: 11/May/11 Updated: 04/Jan/13 Resolved: 11/May/11 |
|
| Status: | Resolved |
| Project: | Gradle |
| Affects Version/s: | 1.0-milestone-3 |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Alexander Kitaev | Assignee: | Peter Niederwieser |
| Resolution: | Not A Bug | Votes: | 0 |
| Description |
|
The following does not work: buildscript { initDefaultProperties() // ... }def initDefaultProperties() { // lot of default properties set here. }The workaround is: buildscript { apply from: 'build.defaults.gradle' // .. }and to put all defaults initialization into build.defaults.gradle. |
| Comments |
| Comment by Peter Niederwieser [ 11/May/11 ] |
|
It isn't supposed to work. Think of the buildscript {} section as a separate script that gets executed before the surrounding script. |