@cyclonedx/cdxgen 8.6.1 → 8.6.2

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.
Files changed (2) hide show
  1. package/index.js +10 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1244,17 +1244,21 @@ const createJavaBom = async (path, options) => {
1244
1244
  }
1245
1245
  if (gradleFiles && gradleFiles.length && options.installDeps) {
1246
1246
  let gradleCmd = utils.getGradleCommand(path, null);
1247
+ const defaultDepTaskArgs = ["-q", "--console", "plain", "--build-cache"];
1247
1248
  allProjects.push(parentComponent);
1249
+ let depTaskWithArgs = ["dependencies"];
1250
+ if (process.env.GRADLE_DEPENDENCY_TASK) {
1251
+ depTaskWithArgs = process.env.GRADLE_DEPENDENCY_TASK.split(" ");
1252
+ }
1248
1253
  for (let sp of allProjects) {
1249
1254
  let gradleDepArgs = [
1250
1255
  sp.purl === parentComponent.purl
1251
- ? "dependencies"
1252
- : `:${sp.name}:dependencies`,
1253
- "-q",
1254
- "--console",
1255
- "plain",
1256
- "--build-cache"
1256
+ ? depTaskWithArgs[0]
1257
+ : `:${sp.name}:${depTaskWithArgs[0]}`
1257
1258
  ];
1259
+ gradleDepArgs = gradleDepArgs
1260
+ .concat(depTaskWithArgs.slice(1))
1261
+ .concat(defaultDepTaskArgs);
1258
1262
  // Support custom GRADLE_ARGS such as --configuration runtimeClassPath
1259
1263
  if (process.env.GRADLE_ARGS) {
1260
1264
  const addArgs = process.env.GRADLE_ARGS.split(" ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cdxgen",
3
- "version": "8.6.1",
3
+ "version": "8.6.2",
4
4
  "description": "Creates CycloneDX Software Bill-of-Materials (SBOM) from source or container image",
5
5
  "homepage": "http://github.com/cyclonedx/cdxgen",
6
6
  "author": "Prabhu Subramanian <prabhu@appthreat.com>",