[GRADLE-1784] Support @Input's of type Configuration Created: 06/Sep/11 Updated: 01/Jun/16 Resolved: 01/Jun/16 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Improvement | ||
Reporter: | Peter Niederwieser | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 0 |
Description |
I have a task that takes some Configuration}}s as its input. The task can't just take {{FileCollection}}s because it has to reason about dependencies. However, annotating the inputs with {{@Input fails because DefaultConfiguration_Decorated isn't serializable. Another potential problem is that Configuration doesn't define equality. |
Comments |
Comment by Luke Daley [ 07/May/13 ] |
What's the use case for using @Input instead of @InputFiles? |
Comment by Peter Niederwieser [ 07/May/13 ] |
The task was operating on the dependency information, not the resolved files. Hence @InputFiles would not have given the correct up-to-date behavior and would have unnecessarily resolved the configuration. I guess one way to overcome this would have been to implement a getter annotated with @Input that captures the dependency information in serializable form. |