Skip to content

Commit

Permalink
Merge pull request #238 from chali/FilterConfigurations
Browse files Browse the repository at this point in the history
Filter out configurations that are in initial lock file but are not resolvable anymore
  • Loading branch information
chali authored Feb 17, 2022
2 parents 5053b6f + f6f7c1f commit a624245
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class PathAwareDiffReportGenerator : DiffReportGenerator {
// is marked with configuration names where those paths belong.
override fun generateDiffReport(project: Project, diffsByConfiguration: Map<String, List<DependencyDiff>> ): List<Map<String, Any>> {
val pathsPerConfiguration: List<ConfigurationPaths> = diffsByConfiguration
.filterKeys { project.configurations.findByName(it) != null }
.filterKeys { name ->
val conf = project.configurations.findByName(name)
conf != null && conf.isCanBeResolved
}
.map { (configurationName: String, differences: List<DependencyDiff>) ->
val completeDependencyTree: AnnotatedDependencyTree = constructPathsToAllDependencies(differences, project, configurationName)
val removedInsignificantChanges: AnnotatedDependencyTree = filterPathsWithSignificantChanges(completeDependencyTree)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ class PathAwareDependencyDiffSpec extends IntegrationTestKitSpec {
"test.example:qux": {
"locked": "1.0.0"
}
'''.stripIndent(), LockGenerator.DEFAULT_CONFIG_NAMES_POPULATED_BY_IMPLEMENTATION_SCOPE + "notUsedConfigurationAnymore")
'''.stripIndent(), LockGenerator.DEFAULT_CONFIG_NAMES_POPULATED_BY_IMPLEMENTATION_SCOPE + ["notUsedConfigurationAnymore", "compileOnly"])
buildFile << """\
plugins {
id 'nebula.dependency-lock'
Expand Down

0 comments on commit a624245

Please sign in to comment.