use of org.gradle.api.internal.tasks.TaskInputPropertySpec in project gradle by gradle.
the class GetInputPropertiesVisitor method getPropertyValuesFactory.
public Factory<Map<String, Object>> getPropertyValuesFactory() {
return new Factory<Map<String, Object>>() {
@Override
public Map<String, Object> create() {
Map<String, Object> result = new HashMap<String, Object>();
for (TaskInputPropertySpec inputProperty : inputProperties) {
String propertyName = inputProperty.getPropertyName();
try {
Object value = prepareValue(inputProperty.getValue());
result.put(propertyName, value);
} catch (Exception ex) {
throw new InvalidUserDataException(String.format("Error while evaluating property '%s' of %s", propertyName, beanName), ex);
}
}
return result;
}
};
}
Aggregations