use of org.gradle.api.provider.ProviderConvertible in project gradle by gradle.
the class DefaultDependencyConstraintHandler method doAdd.
private DependencyConstraint doAdd(Configuration configuration, Object dependencyNotation, @Nullable Action<? super DependencyConstraint> configureAction) {
if (dependencyNotation instanceof ProviderConvertible<?>) {
return doAddProvider(configuration, ((ProviderConvertible<?>) dependencyNotation).asProvider(), configureAction);
}
if (dependencyNotation instanceof Provider<?>) {
return doAddProvider(configuration, (Provider<?>) dependencyNotation, configureAction);
}
DependencyConstraint dependency = doCreate(dependencyNotation, configureAction);
configuration.getDependencyConstraints().add(dependency);
return dependency;
}
Aggregations