@@ -90,19 +90,15 @@ static DependencyKey makeKey(String path) {
9090 */
9191
9292static Map<DependencyKey , String > calculateHashes (Project project ) {
93- def excludedProp = project. properties. get(' noWitness' )
94- def excluded = excludedProp == null ? [] : excludedProp. split(' ,' )
9593 def projectPath = project. file(' .' ). canonicalPath
9694 def dependencies = new TreeMap<DependencyKey , String > ()
9795 def addDependencies = {
9896 // Skip excluded configurations and their subconfigurations
9997 def scopedName = " ${ project.name} :${ it.name} "
98+ // println "DEBUG:Q001:${project.name}:${it.name}"
10099 it. hierarchy. each {
101100 def superScopedName = " ${ project.name} :${ it.name} "
102- if (excluded. contains(it. name) || excluded. contains(superScopedName)) {
103- println " Skipping excluded configuration ${ scopedName} "
104- return
105- }
101+ // println "DEBUG:Q002:${project.name}:${it.name}"
106102 }
107103 // Skip unresolvable configurations
108104 if (it. metaClass. respondsTo(it, ' isCanBeResolved' ) ? it. isCanBeResolved() : true ) {
@@ -210,9 +206,22 @@ project.task('calculateChecksums').doLast {
210206 witnessFile. write(" " ) // empty the file
211207 witnessFile. append(" dependencyVerification {" + " \n " )
212208 witnessFile. append(" verify = [" + " \n " )
213- dependencies. each {dep ->
214- // HINT: exclude deps that change for different architcures
215- if ((! dep. key. all. startsWith(" and:sdk:platforms:android.jar" )) && ((! dep. key. all. startsWith(" and:sdk:platforms:core-for-system-modules.jar" )))) {
209+
210+ def excludedProp = project. properties. get(' noWitness' )
211+ def excluded = excludedProp == null ? [] : excludedProp. split(' ,' )
212+ println " calculateChecksums:noWitness: ${ excluded} "
213+ dependencies. each { dep ->
214+ // println "DEBUG:C001:${dep.key.all} ---> ${dep.value}"
215+ boolean isExcluded = false
216+ for (excl in excluded) {
217+ if (dep. key. all. startsWith(excl)) {
218+ isExcluded = true
219+ break
220+ }
221+ }
222+ if (isExcluded) {
223+ println " Skipping excluded configuration ${ dep.key.all} :${ dep.value} "
224+ } else {
216225 witnessFile. append(" '${ dep.key.all} :${ dep.value} '," + " \n " )
217226 }
218227 }
0 commit comments