Skip to content

Commit

Permalink
fix: scan all sub-projects even when not starting from the root (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegupov authored Jun 6, 2019
1 parent 6215e92 commit d6d3f34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/init.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ allprojects { everyProj ->
// when resolving the project A, so that it selects a concrete variant of dependency B.
def allConfigurationAttributes = [:] // Map<Attribute<?>, Set<?>>
def attributesAsStrings = [:] // Map<String, Set<string>>
allprojects.findAll(shouldScanProject).each { proj ->
println('SNYKECHO processing project: ' + proj.name)
proj.configurations.findAll({ it.name != 'snykMergedDepsConf' && matchesAttributeFilter(it) }).each { conf ->
rootProject.allprojects.findAll(shouldScanProject).each { proj ->
proj.configurations.findAll({ it.name != 'snykMergedDepsConf' && it.name =~ confNameFilter && matchesAttributeFilter(it) }).each { conf ->
def attrs = conf.attributes
attrs.keySet().each({ attr ->
def value = attrs.getAttribute(attr)
Expand All @@ -154,7 +153,8 @@ allprojects { everyProj ->
// due to ambiguous resolution of dependency variants
println("JSONATTRS " + JsonOutput.toJson(attributesAsStrings))

allprojects.findAll(shouldScanProject).each { proj ->
rootProject.allprojects.findAll(shouldScanProject).each { proj ->
println('SNYKECHO processing project: ' + proj.name)
def snykConf = null
def mergeableConfs = proj.configurations
.findAll({ it.name != 'snykMergedDepsConf' && it.name =~ confNameFilter })
Expand Down

0 comments on commit d6d3f34

Please sign in to comment.