Skip to content

Custom Provider

jkschneider edited this page Nov 16, 2014 · 10 revisions

The custom provider allows for complete control over the version recommendation process. Custom providers are defined by using the special add function in your dependencyRecommendations block. Custom providers may be useful for recommendations that are:

  • sourced from a database
  • scraped from GitHub
  • provided by a custom web service
  • always represented by a single fixed version

Here is an example of using the custom provider to select latest.release for every dependency in the project:

apply plugin: 'java'
apply plugin: 'nebula-dependency-recommender'

dependencyRecommendations {
   add { org, name -> 'latest.release' }
}

dependencies {
   compile 'commons-logging:commons-logging'
   compile 'org.springframework:spring-core'
}
Clone this wiki locally