-
Notifications
You must be signed in to change notification settings - Fork 27
Properties File Provider
Roberto Perez Alcolea edited this page Sep 17, 2019
·
2 revisions
The properties file provider allows you to list recommendations in the format org:module = version. Additionally, the format supports recursive referencing within the file, and wildcards in the property name.
As noted in the file-based providers documentation, properties file providers can be loaded from local files, URIs, URLs, dependency artifacts, and the plain InputStream.
apply plugin: 'java'
apply plugin: 'nebula-dependency-recommender'
dependencyRecommendations {
propertiesFile file: file('recommendations.props')
}Here is an example properties file:
GUAVA_VERSION = 18.0
com.google.guava:guava = $GUAVA_VERSION
some:other = $com.google.guava:guava
Technically, the provider does not distinguish between properties that are clearly "variables" (i.e. GUAVA_VERSION) and properties that are modules (i.e. some:other), but this has no impact. Notice in the example above that two substitutions are made by the plugin to come up with a some:other version of 18.0.