netflix.nebula.dependency.recommender.provider.CustomRecommendationProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nebula-dependency-recommender Show documentation
Show all versions of nebula-dependency-recommender Show documentation
Allows projects to leave off version numbers in dependencies section and have versions recommended by other sources
package netflix.nebula.dependency.recommender.provider;
import groovy.lang.Closure;
public class CustomRecommendationProvider extends AbstractRecommendationProvider {
private Closure versionFunction;
public CustomRecommendationProvider(Closure versionFunction) {
this.versionFunction = versionFunction;
}
@Override
public String getVersion(String org, String name) {
return (String) versionFunction.call(org, name);
}
}