diff --git a/help/help.txt b/help/help.txt index 3d920d43ee9..c2f473649ae 100644 --- a/help/help.txt +++ b/help/help.txt @@ -55,6 +55,15 @@ Gradle options: test a specific sub-project. --all-sub-projects For "multi project" configurations, test all sub-projects. + --configuration-matching= + Resolve dependencies using only configuration(s) that + match the provided Java regular expression, e.g. + '^releaseRuntimeClasspath$'. + --configuration-attributes= + Select certain values of configuration attributes to + resolve the dependencies. E.g.: + 'buildtype:release,usage:java-runtime' + More information: https://snyk.io/docs/cli-advanced-gradle-testing/ .Net (Nuget) options: --assets-project-name diff --git a/package.json b/package.json index e4604fc1dc7..daba4fdeae0 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "snyk-config": "^2.2.1", "snyk-docker-plugin": "1.25.1", "snyk-go-plugin": "1.9.0", - "snyk-gradle-plugin": "2.11.2", + "snyk-gradle-plugin": "2.12.4", "snyk-module": "1.9.1", "snyk-mvn-plugin": "2.3.0", "snyk-nodejs-lockfile-parser": "1.13.0", diff --git a/src/cli/commands/monitor.ts b/src/cli/commands/monitor.ts index 5e593681e5e..31835232d37 100644 --- a/src/cli/commands/monitor.ts +++ b/src/cli/commands/monitor.ts @@ -144,9 +144,9 @@ async function monitor(...args0: MethodArgs): Promise { } else { if (!options['gradle-sub-project'] && inspectResult.plugin.meta - && inspectResult.plugin.meta.allDepRootNames - && inspectResult.plugin.meta.allDepRootNames.length > 1) { - advertiseSubprojectsCount = inspectResult.plugin.meta.allDepRootNames.length; + && inspectResult.plugin.meta.allSubProjectNames + && inspectResult.plugin.meta.allSubProjectNames.length > 1) { + advertiseSubprojectsCount = inspectResult.plugin.meta.allSubProjectNames.length; } perDepRootResults = [inspectResult]; } diff --git a/src/lib/snyk-test/run-test.ts b/src/lib/snyk-test/run-test.ts index 47a73f93912..3ff7aea0cda 100644 --- a/src/lib/snyk-test/run-test.ts +++ b/src/lib/snyk-test/run-test.ts @@ -214,9 +214,9 @@ async function getDepsFromPlugin(root, options: TestOptions): Promise 1) { - options.advertiseSubprojectsCount = inspectRes.plugin.meta.allDepRootNames.length; + && inspectRes.plugin.meta.allSubProjectNames + && inspectRes.plugin.meta.allSubProjectNames.length > 1) { + options.advertiseSubprojectsCount = inspectRes.plugin.meta.allSubProjectNames.length; } return { plugin: inspectRes.plugin, diff --git a/src/lib/types.ts b/src/lib/types.ts index 772473101c1..0f97059543e 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -12,7 +12,7 @@ export interface PluginMetadata { runtime?: any; dockerImageId: any; meta?: { - allDepRootNames: string[]; // To warn the user about subprojects not being scanned + allSubProjectNames: string[]; // To warn the user about subprojects not being scanned }; } diff --git a/test/acceptance/cli.acceptance.test.ts b/test/acceptance/cli.acceptance.test.ts index 9a53adbb3bc..e1089572d90 100644 --- a/test/acceptance/cli.acceptance.test.ts +++ b/test/acceptance/cli.acceptance.test.ts @@ -2310,7 +2310,7 @@ test('`monitor gradle-app`', async (t) => { name: 'testplugin', runtime: 'testruntime', meta: { - allDepRootNames: ['foo', 'bar'], + allSubProjectNames: ['foo', 'bar'], }, }, package: {},