[GRADLE-2701] "exclude" specified in the top-level build file using allprojects clause is not applied when generating eclipse files for a subproject Created: 08/Mar/13 Updated: 02/Apr/13 Resolved: 02/Apr/13 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.4 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Hemant Gokhale | Assignee: | Unassigned |
Resolution: | Not A Bug | Votes: | 0 |
Known Issue Of: |
Description |
I have a project with multiple sub-projects. The top-level build file has this: allprojects { } When I generate eclipse files for a sub-project using the eclipse task, this exclusion is ignored. If I add the configurations block directly in the sub-project build file it works as expected. |
Comments |
Comment by Adam Murdoch [ 27/Mar/13 ] |
Using `all*.exclude` configures all the configurations defined at the moment the statement is called. If you do this in the root build script, the subprojects will not yet be configured and so there will be no configurations defined. You need to do this instead: allprojects { } The `all { }` method is lazy and configures the configurations as they are defined. |
Comment by Hemant Gokhale [ 31/Mar/13 ] |
I tried that and it worked like a charm! Thank you, Adam. |