snyk 1.978.0 → 1.979.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2475,10 +2475,10 @@
2475
2475
  },
2476
2476
  {
2477
2477
  "name": "snyk-gradle-plugin",
2478
- "version": "3.21.0",
2478
+ "version": "3.21.1",
2479
2479
  "author": "snyk.io",
2480
2480
  "repository": "https://github.com/snyk/snyk-gradle-plugin",
2481
- "source": "https://registry.npmjs.org/snyk-gradle-plugin/-/snyk-gradle-plugin-3.21.0.tgz",
2481
+ "source": "https://registry.npmjs.org/snyk-gradle-plugin/-/snyk-gradle-plugin-3.21.1.tgz",
2482
2482
  "license": "Apache-2.0",
2483
2483
  "licenseText": "Copyright 2017 Snyk Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
2484
2484
  },
@@ -171,11 +171,18 @@ def findProjectConfigs(proj, confNameFilter, confAttrSpec) {
171
171
  proj.configurations.each({ debugLog("conf.name=$it.name; conf.canBeResolved=$it.canBeResolved; conf.canBeConsumed=$it.canBeConsumed") })
172
172
  // We are looking for a configuration that `canBeResolved`, because it's a configuration for which
173
173
  // we can compute a dependency graph and that contains all the necessary information for resolution to happen.
174
- // if we cannot find dependencies that can be only resolved but not consumable
175
- // we try to find configs that are simultaneously resolvable and consumable
176
- // to prevent dependency resolution conflicts (e.g. Cannot choose between the following variants)
177
- // we avoid the coexistence of (canBeResolved: true, canBeConsumed: false) and (canBeResolved: true, canBeConsumed: true) configs
178
- def resolvable = matching.findAll({ it.canBeResolved == true })
174
+ // See Gradle docs: https://docs.gradle.org/current/userguide/declaring_dependencies.html#sec:resolvable-consumable-configs
175
+ def resolvable = []
176
+ matching.each({ it ->
177
+ if (!it.canBeResolved) { return }
178
+ try {
179
+ // Try accessing resolvedConfiguration to filter out configs that may cause issues in strict lock mode
180
+ it.resolvedConfiguration
181
+ resolvable.add(it)
182
+ } catch (Exception ex) {
183
+ // Swallow the error
184
+ }
185
+ })
179
186
  debugLog("resolvableConfigs=$resolvable")
180
187
  return resolvable
181
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snyk",
3
- "version": "1.978.0",
3
+ "version": "1.979.0",
4
4
  "description": "snyk library and cli utility",
5
5
  "files": [
6
6
  "help/cli-commands",