You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I primarily use nebula-dependency-recommender on multi-project repositories and have found the properties file provider to be really helpful for consolidating versions in a single place. I've recently been exploring using the gradle-dependency-lock-plugin so that I can upgrade dependencies regularly.
However, it appears that in order to gain both benefits, I need to define the extension in an if/else block as follows:
if (System.env.UPDATE_LOCKS=="true"/* can equivalently check a gradle property */) {
dependencyRecommendations {
propertiesFile file: project.rootProject.file('versions.props')
}
} else {
dependencyRecommendations {
dependencyLock file: project.file('dependencies.lock')
}
}
I'm looking for suggestions on a better way to achieve this behavior. I looked through some repositories in the Netflix org but it appears that most repositories inline dependency versions, even for multi-project repositories.
One idea is to define my own plugin, with an extension wrapping the dependencyRecommendations block:
The plugin would then set the actual dependencyRecommendations extension to a convention-based lock file location in most cases, and to the specified providers if a certain environment variable/gradle property is set.
The text was updated successfully, but these errors were encountered:
I primarily use nebula-dependency-recommender on multi-project repositories and have found the properties file provider to be really helpful for consolidating versions in a single place. I've recently been exploring using the gradle-dependency-lock-plugin so that I can upgrade dependencies regularly.
However, it appears that in order to gain both benefits, I need to define the extension in an if/else block as follows:
I'm looking for suggestions on a better way to achieve this behavior. I looked through some repositories in the Netflix org but it appears that most repositories inline dependency versions, even for multi-project repositories.
One idea is to define my own plugin, with an extension wrapping the dependencyRecommendations block:
The plugin would then set the actual
dependencyRecommendations
extension to a convention-based lock file location in most cases, and to the specified providers if a certain environment variable/gradle property is set.The text was updated successfully, but these errors were encountered: